encrypt property

Future<String> get encrypt

Asynchronously encrypts the value.

Throws an exception if the encryptionKey length is not valid.

Implementation

Future<String> get encrypt async {
  if (!validAesKeyLength.contains(encryptionKey.length)) {
    throw Exception(
        "[SharedPreferencesWrapperEncryption AES] key length should be 16/24/32 characters.");
  } else {
    return await aesEncrypt(encryptionKey, value);
  }
}