Q

Using MD5 in Java

I wanna know the encryption algorithm used by Linux 7.0/7.1/7.2, which is usually known as MD5. Encrypted password is stored in /etc/shadow and is 34 bytes long. MD5 generates a signature of 16 bytes according to its rfc.

Please help me, because I want to implement it the same way in Java, or is there already an implementation in Java for that?


Yes. The standard Java crypto classes have MD5. You can also find other implementations in various places such as:

  • http://jigsaw.w3.org/Doc/Programmer/api/org/w3c/tools/crypt/Md5.html
  • http://www.jcvs.org/jcvslet/JCVSlet/log/gjt/java/fi/iki/santtu/md5/MD5.java/0
  • http://www.cs.hut.fi/~santtu/java/

    Any of these should do the trick for you.


    For more information on this topic, visit these other SearchSecurity.com resources:
    Best Web Links: Encryption
    Tech Tip: A primer on encryption
    Ask the Expert: Encryption algorithms


    For news, advice and other information about application security, click here.

  • This was first published in January 2002

    Dig deeper on Disk Encryption and File Encryption

    Pro+

    Features

    Enjoy the benefits of Pro+ membership, learn more and join.

    Have a question for an expert?

    Please add a title for your question

    Get answers from a TechTarget expert on whatever's puzzling you.

    You will be able to add details on the next page.

    0 comments

    Oldest 

    Forgot Password?

    No problem! Submit your e-mail address below. We'll send you an email containing your password.

    Your password has been sent to:

    -ADS BY GOOGLE

    SearchCloudSecurity

    SearchNetworking

    SearchCIO

    SearchConsumerization

    SearchEnterpriseDesktop

    SearchCloudComputing

    ComputerWeekly

    Close