Java encryption Technology (i)

Source: Internet
Author: User
Tags base64 hash hmac md5 asymmetric encryption

Encryption and decryption, used to be a major component of my graduation design. After working for many years back then that encryption, decryption algorithm, it is too simple.

To come to the point, we mainly describe Java has implemented some encryption and decryption algorithms, and finally introduced digital certificates.

such as the basic one-way encryption algorithm:

BASE64, strictly speaking, belongs to the coding format, not the encryption algorithm.

MD5 (Message Digest algorithm 5, Information Digest algorithm)

SHA (Secure Hash algorithm, secure Hash Algorithm)

HMAC (hash messages authentication code, hash message authentication code)

Complex symmetric encryption (DES, PBE), asymmetric encryption algorithms:

DES (Data encryption Standard, encryption algorithm)

PBE (password-based encryption, based on password authentication)

RSA (the name of the algorithm is named after the inventor: Ron Rivest, Adishamir and Leonard Adleman)

DH (Diffie-hellman algorithm, key agreement)

DSA (Digital Signature algorithm, digital signature)

ECC (elliptic Curves cryptography, Elliptic curve cryptography)

This article briefly introduces several methods of BASE64, MD5, SHA and HMAC.

MD5, SHA, HMAC these three kinds of encryption algorithms, is not reversible encryption, is not decrypted encryption method. We usually just use them as the basis for encryption. Simple above three kinds of encryption are not reliable.

BASE64

As defined by RFC2045, Base64 is defined as: Base64 content transfer encoding is designed to describe the 8-bit byte of any sequence as a form that is not easily recognized directly by the person. (The Base64 content-transfer-encoding is designed to represent arbitrary sequences of octets in a form "not" be Hu Manly readable.)

Common in mail, HTTP encryption, interception of HTTP information, you will find the login operation of the user name, password field by BASE64 encryption.

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.