Browse Source

PHPCS errors.

Mark Story 11 years ago
parent
commit
950f43eb4c
3 changed files with 5 additions and 3 deletions
  1. 1 0
      src/Utility/Crypto/Mcrypt.php
  2. 3 3
      src/Utility/Crypto/OpenSsl.php
  3. 1 0
      src/Utility/Security.php

+ 1 - 0
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;

+ 3 - 3
src/Utility/Crypto/OpenSsl.php

@@ -28,13 +28,13 @@ namespace Cake\Utility\Crypto;
 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.');

+ 1 - 0
src/Utility/Security.php

@@ -102,6 +102,7 @@ class Security {
  *
  * @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) {