With this example, you can encrypt and decrypt plain text and files. The following options are available:
This solution uses the built-in cryptography features provided by Java.
- Text encoding options: Hex or Base64
- Selectable key sizes: AES-128, AES-192, or AES-256
- Option to embed a salt into the encrypted text and extract it for decryption
- Option to embed a salt or ID into an encrypted file and extract it before decryption
- File encryption using either chunked mode or non-chunked (in-memory) mode
This solution uses the built-in cryptography features provided by Java.