-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.x] StringEncrypter interface for better DX (#36578)
* StringEncrypter interface for better DX * StyleCI * Update Encrypter.php Co-authored-by: Taylor Otwell <[email protected]>
- Loading branch information
1 parent
e8ebbc6
commit ee006b8
Showing
3 changed files
with
29 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
namespace Illuminate\Contracts\Encryption; | ||
|
||
interface StringEncrypter | ||
{ | ||
/** | ||
* Encrypt a string without serialization. | ||
* | ||
* @param string $value | ||
* @return string | ||
* | ||
* @throws \Illuminate\Contracts\Encryption\EncryptException | ||
*/ | ||
public function encryptString($value); | ||
|
||
/** | ||
* Decrypt the given string without unserialization. | ||
* | ||
* @param string $payload | ||
* @return string | ||
* | ||
* @throws \Illuminate\Contracts\Encryption\DecryptException | ||
*/ | ||
public function decryptString($payload); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters