diff --git a/src/Authorizer.php b/src/Authorizer.php index 82a6e35..2d58e0a 100644 --- a/src/Authorizer.php +++ b/src/Authorizer.php @@ -50,7 +50,7 @@ public static function sign($allowedResource, $authzgen) openssl_public_encrypt($resourceSecret, $encryptedSecret, $publicKey); - return utf8_encode($encryptedSecret); + return base64_encode($encryptedSecret); } /** @@ -63,7 +63,7 @@ public static function sign($allowedResource, $authzgen) */ public static function decrypt($encryptedSecret) { - openssl_private_decrypt(utf8_decode($encryptedSecret), $decryptedSecret, self::getPrivateKey()); + openssl_private_decrypt(base64_decode($encryptedSecret), $decryptedSecret, self::getPrivateKey()); return $decryptedSecret; }