Warning! This documentation is a work in progress. Expect things to be out of date and not actually work according to instructions.
Simple Encryption and Decryption
The io.stallion.utils.Encrypter
class contains a wrapper around Java cryptography functions, with best practices included (with the one exception – we use 128bit keys instead of 256 due to export restrictions).
String myString = "A string to be encrypted";
String encrypted = Encrypter.encryptString("mySecretPassPhrase", myString);
String decrypted = Encrypter.decryptString("mySecretPassPhrase", encrypted);
assert decrypted.equals(myString);
© 2024 Stallion Software LLC