Last month I released a Swift-based library for simple AES 256 bit encryption/decryption called CRDCrypt on GitHub and CocoaPods. This month I’ve completed the equivalent library for Android called CRDCrypt-Android available now on GitHub and jitpack.io.
CRDCrypt for Android is an easy-to-use code library that allows you to encrypt/decrypt small amounts of data using the AES 256-bit algorithm. It’s API is similar to the Swift version and consists of these static methods:
public static byte generateInitializationVector() throws CRDCryptException
This method will allow you to generate a random initialization vector that can be used optionally to encrypt/decrypt data with a psuedo-random byte pattern in the result so encryption is less predictable.
The encryption/decryption API is:
public static byte aes256Encrypt(String key, byte decrypted, byte initializationVector) throws CRDCryptException public static byte aes256Decrypt(String key, byte encrypted, byte initializationVector) throws CRDCryptException
I hope you will find CRDCrypt-Android of use in your next Android project.