refactoring routing and class comments.
This commit is contained in:
@@ -24,8 +24,9 @@ class Crypter {
|
||||
/**
|
||||
* Encrypt a string using Mcrypt.
|
||||
*
|
||||
* The string will be encrypted using the cipher and mode specified when the crypter
|
||||
* instance was created, and the final result will be base64 encoded.
|
||||
* The string will be encrypted using the cipher and mode specified
|
||||
* when the crypter instance was created, and the final result will
|
||||
* be base64 encoded.
|
||||
*
|
||||
* <code>
|
||||
* // Encrypt a string using the Mcrypt PHP extension
|
||||
@@ -70,8 +71,9 @@ class Crypter {
|
||||
*/
|
||||
public static function decrypt($value)
|
||||
{
|
||||
// Since all encrypted strings generated by this class are base64 encoded, we will
|
||||
// first attempt to base64 decode the string. If we can't do it, we'll bail out.
|
||||
// Since all encrypted strings generated by this class are base64
|
||||
// encoded, we will first attempt to base64 decode the string.
|
||||
// If we can't do it, we'll bail out.
|
||||
if ( ! is_string($value = base64_decode($value, true)))
|
||||
{
|
||||
throw new \Exception('Decryption error. Input value is not valid base64 data.');
|
||||
|
||||
Reference in New Issue
Block a user