!!! USE ON OWN RISK ONLY !!!
Here’s an utility i wrote to encrypt and decrypt small (max 117 Byte) byte-arrays/Strings with (Java-built-in) RSA in a thread safe way.
The RSAPublicKeyUtility allows you to do RSAPublicKey <-> byte-array/String conversion for easy public-key sharing.
Default settings are a keysize of 1024 and “RSA/ECB/PKCS1Padding”-cipher
KeyPair is generated when first loading the class and kept for the lifetime of the VM.
This is basically an easy-use wrapper around Javas RSA-encryption, originally built to send passwords securely.
Yell if you find something that smells funny