diff --git a/src/encryption.ts b/src/encryption.ts index 8ba0fea..33056a7 100644 --- a/src/encryption.ts +++ b/src/encryption.ts @@ -177,6 +177,9 @@ export function decryptOnRead( }) { try { if (!cloakedStringRegex.test(cipherText)) { + if (fieldConfig.strictDecryption) { + throw new Error('Value is not encrypted and mode=strict') + } return } const decryptionKey = findKeyForMessage(cipherText, keys.keychain)