Java security learning-Message Digest (messagedigest)

Source: Internet
Author: User
Tags rfc

Messagedigest (Message Digest)

Http://www.lukfor.com

Message DigestAlgorithmThere are mainly the following types:

Md2: The md2 message digest algorithm as defined in RFC 1319.

MD5: The MD5 message digest algorithm as defined in RFC 1321.

SHA-1: The secure hash algorithm, as defined in Secure Hash Standard, nist fips 180-1.

SHA-256,SHA-384, AndSHA-512: New hash algorithms for which the draft federal information processing standard 180-2,Secure Hash Standard (SHS)Is now available. SHA-256 is a 256-bit hash function intended to provide 128 bits of security against collision attacks, while SHA-512 is a 512-bit hash function intended to provide 256 bits of security. A 384-bit hash may be obtained by truncating the SHA-512 output.

We are familiar with MD5 and Sha.

We can use the following method to obtain the messagedigest instance.

Messagedigest MD = messagedigest. getintance ("MD5 ");

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.