aspose file tools
The moose likes Java Micro Edition and the fly likes md5 algorithm Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "md5 algorithm" Watch "md5 algorithm" New topic
Author

md5 algorithm

kumar mdu
Ranch Hand

Joined: Jan 04, 2011
Posts: 59
Hi friends,

how to implement MD5 encrytion algorithm in Java ME?

thanks
kumar
Walter Gabrielsen Iii
Ranch Hand

Joined: Apr 09, 2011
Posts: 158
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

Joined: Jan 04, 2011
Posts: 59
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

Joined: Apr 09, 2011
Posts: 158
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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: md5 algorithm