Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:zendframework/zf2
Browse files Browse the repository at this point in the history
  • Loading branch information
Show file tree
Hide file tree
Showing 46 changed files with 72 additions and 72 deletions.
16 changes: 8 additions & 8 deletions src/BlockCipher.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Crypt
*/
Expand Down Expand Up @@ -57,7 +57,7 @@ class BlockCipher
/**
* The output is binary?
*
* @var boolean
* @var bool
*/
protected $binaryOutput = false;

Expand Down Expand Up @@ -96,7 +96,7 @@ public static function factory($adapter, $options = array())
{
$plugins = static::getSymmetricPluginManager();
$adapter = $plugins->get($adapter, (array) $options);
return new self($adapter);
return new static($adapter);
}

/**
Expand Down Expand Up @@ -213,19 +213,19 @@ public function getSalt()
/**
* Enable/disable the binary output
*
* @param boolean $value
* @param bool $value
* @return BlockCipher
*/
public function setBinaryOutput($value)
{
$this->binaryOutput = (boolean)$value;
$this->binaryOutput = (bool) $value;
return $this;
}

/**
* Get the value of binary output
*
* @return boolean
* @return bool
*/
public function getBinaryOutput()
{
Expand Down Expand Up @@ -281,7 +281,7 @@ public function setCipherAlgorithm($algo)
/**
* Get the cipher algorithm
*
* @return string|boolean
* @return string|bool
*/
public function getCipherAlgorithm()
{
Expand Down Expand Up @@ -383,7 +383,7 @@ public function encrypt($data)
* Decrypt
*
* @param string $data
* @return string|boolean
* @return string|bool
* @throws Exception\InvalidArgumentException
*/
public function decrypt($data)
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/ExceptionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Crypt
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Crypt
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Crypt
*/
Expand Down
8 changes: 4 additions & 4 deletions src/Hash.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Crypt
*/
Expand All @@ -29,7 +29,7 @@ class Hash
/**
* @param string $hash
* @param string $data
* @param boolean $output
* @param bool $output
* @throws Exception\InvalidArgumentException
* @return string
*/
Expand All @@ -48,7 +48,7 @@ public static function compute($hash, $data, $output = self::OUTPUT_STRING)
* Get the output size according to the hash algorithm and the output format
*
* @param string $hash
* @param boolean $output
* @param bool $output
* @return integer
*/
public static function getOutputSize($hash, $output = self::OUTPUT_STRING)
Expand All @@ -70,7 +70,7 @@ public static function getSupportedAlgorithms()
* Is the hash algorithm supported?
*
* @param string $algorithm
* @return boolean
* @return bool
*/
public static function isSupported($algorithm)
{
Expand Down
8 changes: 4 additions & 4 deletions src/Hmac.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Crypt
*/
Expand Down Expand Up @@ -36,7 +36,7 @@ class Hmac
* @param string $key
* @param string $hash
* @param string $data
* @param boolean $output
* @param bool $output
* @throws Exception\InvalidArgumentException
* @return string
*/
Expand All @@ -59,7 +59,7 @@ public static function compute($key, $hash, $data, $output = self::OUTPUT_STRING
* Get the output size according to the hash algorithm and the output format
*
* @param string $hash
* @param boolean $output
* @param bool $output
* @return integer
*/
public static function getOutputSize($hash, $output = self::OUTPUT_STRING)
Expand All @@ -81,7 +81,7 @@ public static function getSupportedAlgorithms()
* Is the hash algorithm supported?
*
* @param string $algorithm
* @return boolean
* @return bool
*/
public static function isSupported($algorithm)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Key/Derivation/Exception/ExceptionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Crypt
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Key/Derivation/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Crypt
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Key/Derivation/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Crypt
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Key/Derivation/Pbkdf2.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Crypt
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Key/Derivation/SaltedS2k.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Crypt
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Password/Bcrypt.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Crypt
*/
Expand Down Expand Up @@ -107,7 +107,7 @@ public function create($password)
*
* @param string $password
* @param string $hash
* @return boolean
* @return bool
*/
public function verify($password, $hash)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Password/Exception/ExceptionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Crypt
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Password/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Crypt
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Password/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Crypt
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Password/PasswordInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Crypt
*/
Expand All @@ -25,7 +25,7 @@ public function create($password);
*
* @param string $password The password to hash
* @param string $hash The supplied hash to validate
* @return boolean Does the password validate against the hash
* @return bool Does the password validate against the hash
*/
public function verify($password, $hash);
}
8 changes: 4 additions & 4 deletions src/PublicKey/DiffieHellman.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Crypt
*/
Expand Down Expand Up @@ -36,7 +36,7 @@ class DiffieHellman
* Static flag to select whether to use PHP5.3's openssl extension
* if available.
*
* @var boolean
* @var bool
*/
public static $useOpenssl = true;

Expand Down Expand Up @@ -120,7 +120,7 @@ public function __construct($prime, $generator, $privateKey = null, $privateKeyF
*/
public static function useOpensslExtension($flag = true)
{
static::$useOpenssl = (boolean) $flag;
static::$useOpenssl = (bool) $flag;
}

/**
Expand Down Expand Up @@ -378,7 +378,7 @@ public function getPrivateKey($format = self::FORMAT_NUMBER)
/**
* Check whether a private key currently exists.
*
* @return boolean
* @return bool
*/
public function hasPrivateKey()
{
Expand Down
10 changes: 5 additions & 5 deletions src/PublicKey/Rsa.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Crypt
*/
Expand Down Expand Up @@ -165,9 +165,9 @@ public function sign($data, Rsa\PrivateKey $privateKey = null)

if ($this->options->getBinaryOutput()) {
return $signature;
} else {
return base64_encode($signature);
}

return base64_encode($signature);
}

/**
Expand Down Expand Up @@ -228,9 +228,9 @@ public function encrypt($data, Rsa\AbstractKey $key = null)

if ($this->options->getBinaryOutput()) {
return $encrypted;
} else {
return base64_encode($encrypted);
}

return base64_encode($encrypted);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/PublicKey/Rsa/AbstractKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Crypt
*/
Expand Down
2 changes: 1 addition & 1 deletion src/PublicKey/Rsa/Exception/ExceptionInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Crypt
*/
Expand Down
2 changes: 1 addition & 1 deletion src/PublicKey/Rsa/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Crypt
*/
Expand Down
2 changes: 1 addition & 1 deletion src/PublicKey/Rsa/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Crypt
*/
Expand Down
2 changes: 1 addition & 1 deletion src/PublicKey/Rsa/PrivateKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Crypt
*/
Expand Down
2 changes: 1 addition & 1 deletion src/PublicKey/Rsa/PublicKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Crypt
*/
Expand Down
Loading

0 comments on commit 70d5d09

Please sign in to comment.