diff --git a/.travis.yml b/.travis.yml index eb1735b..59409eb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,6 @@ language: php php: +- 7.0 - 5.6 - 5.5 - 5.4 diff --git a/composer.json b/composer.json index d5e6dfb..10e36f3 100644 --- a/composer.json +++ b/composer.json @@ -39,7 +39,7 @@ "php": ">=5.4", "guzzle/guzzle": "3.9.*", "firebase/php-jwt": "2.2.*", - "phpseclib/phpseclib": "0.3.*" + "phpseclib/phpseclib": "2.0.*" }, "require-dev": { "phpunit/phpunit": "4.*" diff --git a/src/Authc/Api/ApiKeyEncryptionUtils.php b/src/Authc/Api/ApiKeyEncryptionUtils.php index 88019f8..c768d21 100644 --- a/src/Authc/Api/ApiKeyEncryptionUtils.php +++ b/src/Authc/Api/ApiKeyEncryptionUtils.php @@ -18,6 +18,8 @@ * limitations under the License. */ +use phpseclib\Crypt\AES; + class ApiKeyEncryptionUtils { public static function decrypt($secret, $password, ApiKeyEncryptionOptions $options) @@ -28,7 +30,8 @@ public static function decrypt($secret, $password, ApiKeyEncryptionOptions $opti $keyLengthBits = $options->getEncryptionKeySize(); $iv = substr($decodedSecret, 0, 16); - $aes = new \Crypt_AES(); + + $aes = new AES(); $aes->setPassword($password, 'pbkdf2', 'sha1', $salt, $iterations, $keyLengthBits / 8); $aes->setKeyLength($keyLengthBits); $aes->setIV($iv);