overview

Hutool-crypto Overview

Encryption can be divided into three types:

  1. Symmetric encryption, such as AES, DES, etc.
  2. Asymmetric encryption, such as RSA, DSA, etc.
  3. Digest encryption, such as MD5, SHA-1, SHA-256, HMAC, etc.

Hutool-crypto encapsulates these three types of encryption and provides most commonly used encryption algorithms.

For asymmetric encryption, it implements:

  • RSA
  • DSA

For symmetric encryption, it implements:

  • AES
  • ARCFOUR
  • Blowfish
  • DES
  • DESede
  • RC2
  • PBEWithMD5AndDES
  • PBEWithSHA1AndDESede
  • PBEWithSHA1AndRC2_40

For digest algorithms, it implements:

  • MD2
  • MD5
  • SHA-1
  • SHA-256
  • SHA-384
  • SHA-512
  • HmacMD5
  • HmacSHA1
  • HmacSHA256
  • HmacSHA384
  • HmacSHA512

Among them, for commonly used algorithms, the module also provides the SecureUtil utility class for quick encryption.

For the use of various encryption methods, please refer to subsequent chapters.