Interface StorageCipher
@NonNullByDefault
public interface StorageCipher
This allows the encryption and decryption to be performed before saving to storage.
- Author:
- Gary Tse - Initial contribution
- 
Method Details- 
getUniqueCipherIdString getUniqueCipherId()A unique cipher identifier per each implementation of StorageCipher. It allows the OAuthStoreHandler to choose which cipher implementation to use. This is particularly important when old ciphers becomes out-dated and need to be replaced by new implementations.- Returns:
- unique identifier
 
- 
encryptEncrypt the plainText, then produce a base64 encoded cipher text- Parameters:
- plainText-
- Returns:
- base64 encoded( encrypted( text ) )
- Throws:
- GeneralSecurityException- all security-related exception
 
- 
decryptDecrypt the base64 encoded cipher text.- Parameters:
- base64CipherText- This should be the result from the- encrypt(String)
- Returns:
- plain text
- Throws:
- GeneralSecurityException- all security-related exception
 
 
-