Skip to content

Commit 5f45c6f

Browse files
committed
feat(encryption): Add the key names in SodiumHandler.php
1 parent 486bf57 commit 5f45c6f

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

system/Encryption/Handlers/SodiumHandler.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,18 @@ class SodiumHandler extends BaseHandler
3030
*/
3131
protected $key = '';
3232

33+
/**
34+
* Whether to fall back to previous keys when decryption fails.
35+
*/
36+
protected bool $previousKeysFallbackEnabled = false;
37+
38+
/**
39+
* List of previous keys for fallback decryption.
40+
*
41+
* @var list<string>
42+
*/
43+
protected array $previousKeys = [];
44+
3345
/**
3446
* Block size for padding message.
3547
*
@@ -115,6 +127,7 @@ public function decrypt($data, #[SensitiveParameter] $params = null)
115127
* @param string $key
116128
*
117129
* @return string
130+
*
118131
* @throws EncryptionException
119132
*/
120133
protected function decryptWithKey($data, #[SensitiveParameter] $key)

0 commit comments

Comments
 (0)