Skip to content

Commit 2e871d2

Browse files
committed
refactor: add decryptionFailed message and exception method
1 parent 5f63c3f commit 2e871d2

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

system/Encryption/Exceptions/EncryptionException.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,14 @@ public static function forEncryptionFailed()
8282
{
8383
return new static(lang('Encryption.encryptionFailed'));
8484
}
85+
86+
/**
87+
* Thrown during data decryption when a problem or error occurred.
88+
*
89+
* @return static
90+
*/
91+
public static function forDecryptionFailed()
92+
{
93+
return new static(lang('Encryption.decryptionFailed'));
94+
}
8595
}

system/Language/en/Encryption.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@
1919
'starterKeyNeeded' => 'Encrypter needs a starter key.',
2020
'authenticationFailed' => 'Decrypting: authentication failed.',
2121
'encryptionFailed' => 'Encryption failed.',
22+
'decryptionFailed' => 'Decryption failed.',
2223
];

0 commit comments

Comments
 (0)