diff --git a/src/BlockCipher.php b/src/BlockCipher.php index 9c1db74..99aa680 100644 --- a/src/BlockCipher.php +++ b/src/BlockCipher.php @@ -153,7 +153,7 @@ public static function setSymmetricPluginManager($plugins) * Set the symmetric cipher * * @param SymmetricInterface $cipher - * @return BlockCipher + * @return $this Provides a fluent interface */ public function setCipher(SymmetricInterface $cipher) { @@ -175,7 +175,7 @@ public function getCipher() * Set the number of iterations for Pbkdf2 * * @param int $num - * @return BlockCipher + * @return $this Provides a fluent interface */ public function setKeyIteration($num) { @@ -198,7 +198,7 @@ public function getKeyIteration() * Set the salt (IV) * * @param string $salt - * @return BlockCipher + * @return $this Provides a fluent interface * @throws Exception\InvalidArgumentException */ public function setSalt($salt) @@ -237,7 +237,7 @@ public function getOriginalSalt() * Enable/disable the binary output * * @param bool $value - * @return BlockCipher + * @return $this Provides a fluent interface */ public function setBinaryOutput($value) { @@ -259,8 +259,8 @@ public function getBinaryOutput() /** * Set the encryption/decryption key * - * @param string $key - * @return BlockCipher + * @param string $key + * @return $this Provides a fluent interface * @throws Exception\InvalidArgumentException */ public function setKey($key) @@ -287,7 +287,7 @@ public function getKey() * Set algorithm of the symmetric cipher * * @param string $algo - * @return BlockCipher + * @return $this Provides a fluent interface * @throws Exception\InvalidArgumentException */ public function setCipherAlgorithm($algo) @@ -336,7 +336,7 @@ public function getCipherSupportedAlgorithms() * Set the hash algorithm for HMAC authentication * * @param string $hash - * @return BlockCipher + * @return $this Provides a fluent interface * @throws Exception\InvalidArgumentException */ public function setHashAlgorithm($hash) @@ -365,7 +365,7 @@ public function getHashAlgorithm() * Set the hash algorithm for the Pbkdf2 * * @param string $hash - * @return BlockCipher + * @return $this Provides a fluent interface * @throws Exception\InvalidArgumentException */ public function setPbkdf2HashAlgorithm($hash) diff --git a/src/Password/Apache.php b/src/Password/Apache.php index 349ef8d..dfd491c 100644 --- a/src/Password/Apache.php +++ b/src/Password/Apache.php @@ -161,7 +161,7 @@ public function verify($password, $hash) * * @param string $format * @throws Exception\InvalidArgumentException - * @return Apache + * @return $this Provides a fluent interface */ public function setFormat($format) { @@ -192,7 +192,7 @@ public function getFormat() * Set the AuthName (for digest authentication) * * @param string $name - * @return Apache + * @return $this Provides a fluent interface */ public function setAuthName($name) { @@ -215,7 +215,7 @@ public function getAuthName() * Set the username * * @param string $name - * @return Apache + * @return $this Provides a fluent interface */ public function setUserName($name) { diff --git a/src/Password/Bcrypt.php b/src/Password/Bcrypt.php index 4dfef02..89967ee 100644 --- a/src/Password/Bcrypt.php +++ b/src/Password/Bcrypt.php @@ -93,7 +93,7 @@ public function verify($password, $hash) * * @param int|string $cost * @throws Exception\InvalidArgumentException - * @return Bcrypt + * @return $this Provides a fluent interface */ public function setCost($cost) { @@ -124,7 +124,7 @@ public function getCost() * * @param string $salt * @throws Exception\InvalidArgumentException - * @return Bcrypt + * @return $this Provides a fluent interface */ public function setSalt($salt) { diff --git a/src/PublicKey/DiffieHellman.php b/src/PublicKey/DiffieHellman.php index 0de9e2c..84e7e77 100644 --- a/src/PublicKey/DiffieHellman.php +++ b/src/PublicKey/DiffieHellman.php @@ -123,7 +123,7 @@ public static function useOpensslExtension($flag = true) * Generate own public key. If a private number has not already been set, * one will be generated at this stage. * - * @return DiffieHellman + * @return $this Provides a fluent interface * @throws \Zend\Crypt\Exception\RuntimeException */ public function generateKeys() @@ -174,7 +174,7 @@ public function generateKeys() * * @param string $number * @param string $format - * @return DiffieHellman + * @return $this Provides a fluent interface * @throws \Zend\Crypt\Exception\InvalidArgumentException */ public function setPublicKey($number, $format = self::FORMAT_NUMBER) @@ -273,7 +273,7 @@ public function getSharedSecretKey($format = self::FORMAT_NUMBER) * Setter for the value of the prime number * * @param string $number - * @return DiffieHellman + * @return $this Provides a fluent interface * @throws \Zend\Crypt\Exception\InvalidArgumentException */ public function setPrime($number) @@ -309,7 +309,7 @@ public function getPrime($format = self::FORMAT_NUMBER) * Setter for the value of the generator number * * @param string $number - * @return DiffieHellman + * @return $this Provides a fluent interface * @throws \Zend\Crypt\Exception\InvalidArgumentException */ public function setGenerator($number) @@ -345,7 +345,7 @@ public function getGenerator($format = self::FORMAT_NUMBER) * * @param string $number * @param string $format - * @return DiffieHellman + * @return $this Provides a fluent interface * @throws \Zend\Crypt\Exception\InvalidArgumentException */ public function setPrivateKey($number, $format = self::FORMAT_NUMBER) diff --git a/src/PublicKey/Rsa.php b/src/PublicKey/Rsa.php index 8232f18..bb93628 100644 --- a/src/PublicKey/Rsa.php +++ b/src/PublicKey/Rsa.php @@ -116,7 +116,7 @@ public function __construct(RsaOptions $options = null) * Set options * * @param RsaOptions $options - * @return Rsa + * @return $this Provides a fluent interface */ public function setOptions(RsaOptions $options) { @@ -332,7 +332,7 @@ public function decrypt( * @see RsaOptions::generateKeys() * * @param array $opensslConfig - * @return Rsa + * @return $this Provides a fluent interface * @throws Rsa\Exception\RuntimeException */ public function generateKeys(array $opensslConfig = []) diff --git a/src/PublicKey/RsaOptions.php b/src/PublicKey/RsaOptions.php index fedb339..7d8d123 100644 --- a/src/PublicKey/RsaOptions.php +++ b/src/PublicKey/RsaOptions.php @@ -62,7 +62,7 @@ class RsaOptions extends AbstractOptions * Set private key * * @param Rsa\PrivateKey $key - * @return RsaOptions + * @return $this Provides a fluent interface */ public function setPrivateKey(Rsa\PrivateKey $key) { @@ -85,7 +85,7 @@ public function getPrivateKey() * Set public key * * @param Rsa\PublicKey $key - * @return RsaOptions + * @return $this Provides a fluent interface */ public function setPublicKey(Rsa\PublicKey $key) { @@ -107,7 +107,7 @@ public function getPublicKey() * Set pass phrase * * @param string $phrase - * @return RsaOptions + * @return $this Provides a fluent interface */ public function setPassPhrase($phrase) { @@ -129,7 +129,7 @@ public function getPassPhrase() * Set hash algorithm * * @param string $hash - * @return RsaOptions + * @return $this Provides a fluent interface * @throws Rsa\Exception\RuntimeException * @throws Rsa\Exception\InvalidArgumentException */ @@ -169,7 +169,7 @@ public function getOpensslSignatureAlgorithm() * Enable/disable the binary output * * @param bool $value - * @return RsaOptions + * @return $this Provides a fluent interface */ public function setBinaryOutput($value) { @@ -201,7 +201,7 @@ public function getOpensslPadding() * Set the OPENSSL padding * * @param int|null $opensslPadding - * @return $this + * @return $this Provides a fluent interface */ public function setOpensslPadding($opensslPadding) { @@ -213,7 +213,7 @@ public function setOpensslPadding($opensslPadding) * Generate new private/public key pair * * @param array $opensslConfig - * @return RsaOptions + * @return $this Provides a fluent interface * @throws Rsa\Exception\RuntimeException */ public function generateKeys(array $opensslConfig = []) diff --git a/src/Symmetric/Mcrypt.php b/src/Symmetric/Mcrypt.php index 3bf03c4..ee1d7f6 100644 --- a/src/Symmetric/Mcrypt.php +++ b/src/Symmetric/Mcrypt.php @@ -233,9 +233,9 @@ public function getKeySize() * Set the encryption key * If the key is longer than maximum supported, it will be truncated by getKey(). * - * @param string $key + * @param string $key + * @return $this Provides a fluent interface * @throws Exception\InvalidArgumentException - * @return Mcrypt */ public function setKey($key) { @@ -280,9 +280,9 @@ public function getKey() /** * Set the encryption algorithm (cipher) * - * @param string $algo + * @param string $algo + * @return $this Provides a fluent interface * @throws Exception\InvalidArgumentException - * @return Mcrypt */ public function setAlgorithm($algo) { @@ -312,7 +312,7 @@ public function getAlgorithm() * Set the padding object * * @param Padding\PaddingInterface $padding - * @return Mcrypt + * @return $this Provides a fluent interface */ public function setPadding(Padding\PaddingInterface $padding) { @@ -422,9 +422,9 @@ public function getSupportedAlgorithms() /** * Set the salt (IV) * - * @param string $salt + * @param string $salt + * @return $this Provides a fluent interface * @throws Exception\InvalidArgumentException - * @return Mcrypt */ public function setSalt($salt) { @@ -475,9 +475,9 @@ public function getOriginalSalt() /** * Set the cipher mode * - * @param string $mode + * @param string $mode + * @return $this Provides a fluent interface * @throws Exception\InvalidArgumentException - * @return Mcrypt */ public function setMode($mode) { diff --git a/src/Symmetric/Openssl.php b/src/Symmetric/Openssl.php index 4b40aea..fb965ca 100644 --- a/src/Symmetric/Openssl.php +++ b/src/Symmetric/Openssl.php @@ -284,8 +284,8 @@ public function getKeySize() * If the key is longer than maximum supported, it will be truncated by getKey(). * * @param string $key + * @return $this Provides a fluent interface * @throws Exception\InvalidArgumentException - * @return self */ public function setKey($key) { @@ -323,8 +323,8 @@ public function getKey() * Set the encryption algorithm (cipher) * * @param string $algo + * @return $this Provides a fluent interface * @throws Exception\InvalidArgumentException - * @return self */ public function setAlgorithm($algo) { @@ -353,7 +353,7 @@ public function getAlgorithm() * Set the padding object * * @param Padding\PaddingInterface $padding - * @return self + * @return $this Provides a fluent interface */ public function setPadding(Padding\PaddingInterface $padding) { @@ -503,8 +503,8 @@ public function getSupportedAlgorithms() * Set the salt (IV) * * @param string $salt + * @return $this Provides a fluent interface * @throws Exception\InvalidArgumentException - * @return self */ public function setSalt($salt) { @@ -566,8 +566,8 @@ public function getOriginalSalt() * Set the cipher mode * * @param string $mode + * @return $this Provides a fluent interface * @throws Exception\InvalidArgumentException - * @return self */ public function setMode($mode) {