Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

md5 algorithm

 
kumar mdu
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
 
Walter Gabrielsen Iii
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic