Commit 8a175894 authored by Taylor Otwell's avatar Taylor Otwell

Refactor the encryption class.

parent 4dc7f944
......@@ -42,9 +42,7 @@ class Crypt {
*/
public static function decrypt($value)
{
$value = base64_decode($value, true);
if ( ! $value)
if ( ! is_string($value = base64_decode($value, true)))
{
throw new \Exception('Decryption error. Input value is not valid base64 data.');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment