This week's book giveaway is in the Java in General forum.
We're giving away four copies of Java by Comparison (eBook) and have Simon Harrer, Jörg Lenhard, Linus Dietz on-line!
See this thread for details.
Win a copy of Java by Comparison (eBook) this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

md5 algorithm  RSS feed

 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,

how to implement MD5 encrytion algorithm in Java ME?

thanks
kumar
 
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, there are code examples of the Algorithm on Wikipedia : MD5 -- it looks like you would need to know Java bitwise to do it by hand.

There is also Fast MD5 Implementation in Java >> J2ME MIDP/CLDC Versions (Preliminary), but I have no idea if it works or not.

You might also try a search of the internet using terms: md5 (j2me OR "java me") -- the term "j2me" was the early name for "Java ME."
 
kumar mdu
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using this code for MD5 algorithm for encryption



Showing error is as

C:\Documents and Settings\kumar\My Documents\NetBeansProjects\J2ME-MD5\source\src\md5\mdsMidlet.java:7: package com.sun.midp.ssl does not exist
import com.sun.midp.ssl.CryptoException;
C:\Documents and Settings\kumar\My Documents\NetBeansProjects\J2ME-MD5\source\src\md5\mdsMidlet.java:8: package com.sun.midp.ssl does not exist
import com.sun.midp.ssl.MessageDigest;




how can i solve this..?

kumar
 
Walter Gabrielsen Iii
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Either the package "com.sun.midp.*" is part of an optional package (JSRs) or, if you downloaded an Md5 api from the internet, then I think, you need to register the package with your Netbeans application, but not just use import through code but actually include the library so that it's bundled with your application.
 
She still doesn't approve of my superhero lifestyle. Or this shameless plug:
Thread Boost - a very different sort of advertising
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!