decrypt property
Future
get
decrypt
Asynchronously decrypts the encryptedValue.
Checks if the key exists in SharedPreferences and then decrypts the value.
Implementation
Future<dynamic> get decrypt async {
bool isEncrypted = await SharedPreferencesWrapper.mapContainsKey(
EncryptionConstants.encryptionMapKey, accessKey);
if (isEncrypted) {
return salsa20Decrypt(
encryptionKey, Encrypted.fromBase64(encryptedValue));
}
return null;
}