diff --git a/src/JOSE/JWE.php b/src/JOSE/JWE.php index 964d8ce..8c93701 100644 --- a/src/JOSE/JWE.php +++ b/src/JOSE/JWE.php @@ -82,7 +82,7 @@ private function cipher() { throw new JOSE_Exception_UnexpectedAlgorithm('Algorithm not supported'); case 'A128CBC-HS256': case 'A256CBC-HS512': - $cipher = new AES(AES::MODE_CBC); + $cipher = new AES(self::MODE_CBC); break; default: throw new JOSE_Exception_UnexpectedAlgorithm('Unknown algorithm'); @@ -90,7 +90,7 @@ private function cipher() { switch ($this->header['enc']) { case 'A128GCM': case 'A128CBC-HS256': - $cipher->setBlockLength(128); + //$cipher->setBlockLength(128); break; case 'A256GCM': case 'A256CBC-HS512': diff --git a/src/JOSE/JWT.php b/src/JOSE/JWT.php index a18c35d..beb7f2b 100644 --- a/src/JOSE/JWT.php +++ b/src/JOSE/JWT.php @@ -1,6 +1,15 @@ 'JWT', 'alg' => 'none'