diff --git a/src/Utility/Crypto/Mcrypt.php b/src/Utility/Crypto/Mcrypt.php index 95ba7d70db6..2efce6a8388 100644 --- a/src/Utility/Crypto/Mcrypt.php +++ b/src/Utility/Crypto/Mcrypt.php @@ -31,6 +31,7 @@ class Mcrypt { * @param string $key Key to use as the encryption key for encrypted data. * @param string $operation Operation to perform, encrypt or decrypt * @throws \LogicException When there are errors. + * @return string Encrytped binary string data, or decrypted data depending on operation. */ public static function rijndael($text, $key, $operation) { $algorithm = MCRYPT_RIJNDAEL_256; diff --git a/src/Utility/Crypto/OpenSsl.php b/src/Utility/Crypto/OpenSsl.php index 5bc6cfb43a2..203a164ff77 100644 --- a/src/Utility/Crypto/OpenSsl.php +++ b/src/Utility/Crypto/OpenSsl.php @@ -28,13 +28,13 @@ class OpenSsl { /** - * Encrypts/Decrypts a text using the given key using rijndael method. + * Not implemented * * @param string $text Encrypted string to decrypt, normal string to encrypt * @param string $key Key to use as the encryption key for encrypted data. * @param string $operation Operation to perform, encrypt or decrypt - * @throws \InvalidArgumentException When there are errors. - * @return string Encrypted/Decrypted string + * @throws \LogicException Rijndael compatibility does not exist with Openssl. + * @return void */ public static function rijndael($text, $key, $operation) { throw new \LogicException('rijndael is not compatible with OpenSSL. Use mcrypt instead.'); diff --git a/src/Utility/Security.php b/src/Utility/Security.php index c551f661b3e..d207b59b084 100644 --- a/src/Utility/Security.php +++ b/src/Utility/Security.php @@ -102,6 +102,7 @@ public static function setHash($hash) { * * @param object $instance The crypto instance to use. * @return object Crypto instance. + * @throws \InvalidArgumentException When no compatible crypto extension is available. */ public static function engine($instance = null) { if ($instance === null && static::$_instance === null) {