hooks/encryption_recovery library

Functions

clearEncryptedEntries(PVCache cache) Future<void>
Clears all encrypted entries from cache.
createEncryptionKeyValidationHook({required String testKey, String testValue = '_pvcache_key_test', String? encryptionKey, String keyName = '_pvcache_encryption_key', Future<void> onKeyInvalid()?, int priority = -100}) PVCacheHook
Creates a hook that validates encryption key on first access.
createEncryptionRecoveryHook({DecryptionFailureCallback? onDecryptionFailure, bool autoClearOnFailure = false, bool throwOnFailure = false, int priority = 10}) PVCacheHook
Creates a hook that handles decryption failures.
rotateEncryptionKey({required PVCache cache, String keyName = '_pvcache_encryption_key', String? newKey}) Future<void>
Rotates encryption key and clears all encrypted data.
validateEncryptionKey({required PVCache cache, required String testKey, String testValue = '_pvcache_key_test'}) Future<bool>
Validates that encryption key can decrypt existing data.

Typedefs

DecryptionFailureCallback = Future<bool> Function(String key)
Encryption Recovery Hook System