Common

Date Handing

Reflection

IO

HTTP Request

Cryptography

Introduction to Encryption and Decryption Package

Java AES/DES/RSA Encryption and Decryption API

The JDK contains mainstream encryption and decryption APIs, including AES/DES/3DES/RSA. These functionalities are mainly provided by the javax.crypto (JCE, Java Cryptography Extension) and java.security packages. Among these, only RSA belongs to asymmetric encryption (Asymmetric Encryption), while the others are symmetric encryption (Symmetric Encryption). The similarities and differences between them are as follows:

Source Code

The final code is here.

Usage can be referenced in unit tests.

Maven dependency reference, requires Java 8+

<dependency>
    <groupId>com.ajaxjs</groupId>
    <artifactId>aj-cryptography</artifactId>
    <version>1.1</version>
</dependency>

The component jar package is very small, only about 20kb. It only depends on a utility library I wrote myself.