From 901c8a0add26215d45e4781d0631d87484252211 Mon Sep 17 00:00:00 2001 From: Maks3w Date: Mon, 9 Jul 2012 16:16:08 +0200 Subject: [PATCH 1/8] [CS][library] Remove @copyright & @license for fl in $(find . -name "*.php"); do mv $fl $fl.old; sed '/@copyright/d' $fl.old > $fl; rm -f $fl.old; done; for fl in $(find . -name "*.php"); do mv $fl $fl.old; sed '/@license/d' $fl.old > $fl; rm -f $fl.old; done; --- src/BlockCipher.php | 2 -- src/Exception/ExceptionInterface.php | 4 ---- src/Exception/InvalidArgumentException.php | 4 ---- src/Exception/RuntimeException.php | 4 ---- src/Hash.php | 2 -- src/Hmac.php | 2 -- src/Key/Derivation/Exception/ExceptionInterface.php | 6 +----- src/Key/Derivation/Exception/InvalidArgumentException.php | 4 ---- src/Key/Derivation/Exception/RuntimeException.php | 4 ---- src/Key/Derivation/Pbkdf2.php | 2 -- src/Key/Derivation/SaltedS2k.php | 4 ---- src/Password/Bcrypt.php | 4 ---- src/Password/Exception/ExceptionInterface.php | 6 +----- src/Password/Exception/InvalidArgumentException.php | 4 ---- src/Password/Exception/RuntimeException.php | 4 ---- src/Password/PasswordInterface.php | 2 -- src/PublicKey/DiffieHellman.php | 4 ---- src/PublicKey/Rsa.php | 2 -- src/PublicKey/Rsa/AbstractKey.php | 4 ---- src/PublicKey/Rsa/Exception/ExceptionInterface.php | 4 +--- src/PublicKey/Rsa/Exception/InvalidArgumentException.php | 2 -- src/PublicKey/Rsa/Exception/RuntimeException.php | 2 -- src/PublicKey/Rsa/PrivateKey.php | 2 -- src/PublicKey/Rsa/PublicKey.php | 2 -- src/PublicKey/RsaOptions.php | 2 -- src/Symmetric/Exception/ExceptionInterface.php | 6 +----- src/Symmetric/Exception/InvalidArgumentException.php | 4 ---- src/Symmetric/Exception/RuntimeException.php | 4 ---- src/Symmetric/Mcrypt.php | 2 -- src/Symmetric/Padding/PaddingInterface.php | 2 -- src/Symmetric/Padding/Pkcs7.php | 4 ---- src/Symmetric/PaddingPluginManager.php | 4 ---- src/Symmetric/SymmetricInterface.php | 2 -- src/SymmetricPluginManager.php | 4 ---- src/Utils.php | 4 ---- 35 files changed, 4 insertions(+), 114 deletions(-) diff --git a/src/BlockCipher.php b/src/BlockCipher.php index 44f5884..21d9589 100644 --- a/src/BlockCipher.php +++ b/src/BlockCipher.php @@ -3,8 +3,6 @@ * 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) - * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Crypt */ diff --git a/src/Exception/ExceptionInterface.php b/src/Exception/ExceptionInterface.php index f8f067f..b3d66cc 100644 --- a/src/Exception/ExceptionInterface.php +++ b/src/Exception/ExceptionInterface.php @@ -3,8 +3,6 @@ * 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) - * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Crypt */ @@ -13,8 +11,6 @@ /** * @category Zend * @package Zend_Crypt - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License */ interface ExceptionInterface { diff --git a/src/Exception/InvalidArgumentException.php b/src/Exception/InvalidArgumentException.php index a36a079..8f48d8c 100644 --- a/src/Exception/InvalidArgumentException.php +++ b/src/Exception/InvalidArgumentException.php @@ -3,8 +3,6 @@ * 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) - * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Crypt */ namespace Zend\Crypt\Exception; @@ -15,8 +13,6 @@ * @category Zend * @package Zend_Crypt * @subpackage Exception - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License */ class InvalidArgumentException extends \InvalidArgumentException diff --git a/src/Exception/RuntimeException.php b/src/Exception/RuntimeException.php index cd889de..13eb7a8 100644 --- a/src/Exception/RuntimeException.php +++ b/src/Exception/RuntimeException.php @@ -3,8 +3,6 @@ * 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) - * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Crypt */ namespace Zend\Crypt\Exception; @@ -15,8 +13,6 @@ * @category Zend * @package Zend_Crypt * @subpackage Exception - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License */ class RuntimeException extends \RuntimeException diff --git a/src/Hash.php b/src/Hash.php index 548f5a6..fe810b8 100644 --- a/src/Hash.php +++ b/src/Hash.php @@ -3,8 +3,6 @@ * 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) - * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Crypt */ diff --git a/src/Hmac.php b/src/Hmac.php index 8c14f27..499776a 100644 --- a/src/Hmac.php +++ b/src/Hmac.php @@ -3,8 +3,6 @@ * 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) - * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Crypt */ diff --git a/src/Key/Derivation/Exception/ExceptionInterface.php b/src/Key/Derivation/Exception/ExceptionInterface.php index fe14dd1..ab44106 100644 --- a/src/Key/Derivation/Exception/ExceptionInterface.php +++ b/src/Key/Derivation/Exception/ExceptionInterface.php @@ -3,8 +3,6 @@ * 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) - * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Crypt */ namespace Zend\Crypt\Key\Derivation\Exception; @@ -14,8 +12,6 @@ /** * @category Zend * @package Zend_Crypt - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License */ interface ExceptionInterface extends Exception -{} \ No newline at end of file +{} diff --git a/src/Key/Derivation/Exception/InvalidArgumentException.php b/src/Key/Derivation/Exception/InvalidArgumentException.php index 56b418a..82ac839 100644 --- a/src/Key/Derivation/Exception/InvalidArgumentException.php +++ b/src/Key/Derivation/Exception/InvalidArgumentException.php @@ -3,8 +3,6 @@ * 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) - * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Crypt */ namespace Zend\Crypt\Key\Derivation\Exception; @@ -17,8 +15,6 @@ * @category Zend * @package Zend_Crypt * @subpackage Exception - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License */ class InvalidArgumentException extends Exception\InvalidArgumentException implements ExceptionInterface diff --git a/src/Key/Derivation/Exception/RuntimeException.php b/src/Key/Derivation/Exception/RuntimeException.php index 4806ced..93950a7 100644 --- a/src/Key/Derivation/Exception/RuntimeException.php +++ b/src/Key/Derivation/Exception/RuntimeException.php @@ -3,8 +3,6 @@ * 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) - * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Crypt */ @@ -18,8 +16,6 @@ * @category Zend * @package Zend_Crypt * @subpackage Exception - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License */ class RuntimeException extends Exception\RuntimeException implements ExceptionInterface diff --git a/src/Key/Derivation/Pbkdf2.php b/src/Key/Derivation/Pbkdf2.php index fa187b6..cf3ae0c 100644 --- a/src/Key/Derivation/Pbkdf2.php +++ b/src/Key/Derivation/Pbkdf2.php @@ -3,8 +3,6 @@ * 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) - * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Crypt */ diff --git a/src/Key/Derivation/SaltedS2k.php b/src/Key/Derivation/SaltedS2k.php index 16f260d..d42ec5f 100644 --- a/src/Key/Derivation/SaltedS2k.php +++ b/src/Key/Derivation/SaltedS2k.php @@ -3,8 +3,6 @@ * 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) - * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Crypt */ namespace Zend\Crypt\Key\Derivation; @@ -14,8 +12,6 @@ * * @category Zend * @package Zend_Crypt - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License */ class SaltedS2k { diff --git a/src/Password/Bcrypt.php b/src/Password/Bcrypt.php index 1446dd0..191f602 100644 --- a/src/Password/Bcrypt.php +++ b/src/Password/Bcrypt.php @@ -3,8 +3,6 @@ * 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) - * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Crypt */ namespace Zend\Crypt\Password; @@ -19,8 +17,6 @@ * * @category Zend * @package Zend_Crypt - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License */ class Bcrypt implements PasswordInterface { diff --git a/src/Password/Exception/ExceptionInterface.php b/src/Password/Exception/ExceptionInterface.php index 306a06b..4eb77de 100644 --- a/src/Password/Exception/ExceptionInterface.php +++ b/src/Password/Exception/ExceptionInterface.php @@ -3,8 +3,6 @@ * 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) - * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Crypt */ namespace Zend\Crypt\Password\Exception; @@ -14,8 +12,6 @@ /** * @category Zend * @package Zend_Crypt - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License */ interface ExceptionInterface extends Exception -{} \ No newline at end of file +{} diff --git a/src/Password/Exception/InvalidArgumentException.php b/src/Password/Exception/InvalidArgumentException.php index 7748000..0629be1 100644 --- a/src/Password/Exception/InvalidArgumentException.php +++ b/src/Password/Exception/InvalidArgumentException.php @@ -3,8 +3,6 @@ * 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) - * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Crypt */ namespace Zend\Crypt\Password\Exception; @@ -17,8 +15,6 @@ * @category Zend * @package Zend_Crypt * @subpackage Exception - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License */ class InvalidArgumentException extends Exception\InvalidArgumentException implements ExceptionInterface diff --git a/src/Password/Exception/RuntimeException.php b/src/Password/Exception/RuntimeException.php index 340b33e..2586906 100644 --- a/src/Password/Exception/RuntimeException.php +++ b/src/Password/Exception/RuntimeException.php @@ -3,8 +3,6 @@ * 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) - * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Crypt */ @@ -18,8 +16,6 @@ * @category Zend * @package Zend_Crypt * @subpackage Exception - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License */ class RuntimeException extends Exception\RuntimeException implements ExceptionInterface diff --git a/src/Password/PasswordInterface.php b/src/Password/PasswordInterface.php index 66cbdfe..97f974d 100644 --- a/src/Password/PasswordInterface.php +++ b/src/Password/PasswordInterface.php @@ -3,8 +3,6 @@ * 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) - * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Crypt */ namespace Zend\Crypt\Password; diff --git a/src/PublicKey/DiffieHellman.php b/src/PublicKey/DiffieHellman.php index b6e3136..ed2d692 100644 --- a/src/PublicKey/DiffieHellman.php +++ b/src/PublicKey/DiffieHellman.php @@ -3,8 +3,6 @@ * 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) - * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Crypt */ namespace Zend\Crypt\PublicKey; @@ -19,8 +17,6 @@ * * @category Zend * @package Zend_Crypt - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License */ class DiffieHellman { diff --git a/src/PublicKey/Rsa.php b/src/PublicKey/Rsa.php index 9588aef..5cb6296 100644 --- a/src/PublicKey/Rsa.php +++ b/src/PublicKey/Rsa.php @@ -3,8 +3,6 @@ * 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) - * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Crypt */ diff --git a/src/PublicKey/Rsa/AbstractKey.php b/src/PublicKey/Rsa/AbstractKey.php index 002e912..bb44e63 100644 --- a/src/PublicKey/Rsa/AbstractKey.php +++ b/src/PublicKey/Rsa/AbstractKey.php @@ -3,8 +3,6 @@ * 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) - * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Crypt */ @@ -13,8 +11,6 @@ /** * @category Zend * @package Zend_Crypt - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License */ abstract class AbstractKey { diff --git a/src/PublicKey/Rsa/Exception/ExceptionInterface.php b/src/PublicKey/Rsa/Exception/ExceptionInterface.php index 1bd3055..8dd9a75 100644 --- a/src/PublicKey/Rsa/Exception/ExceptionInterface.php +++ b/src/PublicKey/Rsa/Exception/ExceptionInterface.php @@ -3,8 +3,6 @@ * 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) - * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Crypt */ @@ -18,4 +16,4 @@ * @subpackage PublicKey */ interface ExceptionInterface extends Exception -{} \ No newline at end of file +{} diff --git a/src/PublicKey/Rsa/Exception/InvalidArgumentException.php b/src/PublicKey/Rsa/Exception/InvalidArgumentException.php index c3b8e13..8c8d5c3 100644 --- a/src/PublicKey/Rsa/Exception/InvalidArgumentException.php +++ b/src/PublicKey/Rsa/Exception/InvalidArgumentException.php @@ -3,8 +3,6 @@ * 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) - * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Crypt */ diff --git a/src/PublicKey/Rsa/Exception/RuntimeException.php b/src/PublicKey/Rsa/Exception/RuntimeException.php index 6ac6639..d0e2b6d 100644 --- a/src/PublicKey/Rsa/Exception/RuntimeException.php +++ b/src/PublicKey/Rsa/Exception/RuntimeException.php @@ -3,8 +3,6 @@ * 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) - * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Crypt */ diff --git a/src/PublicKey/Rsa/PrivateKey.php b/src/PublicKey/Rsa/PrivateKey.php index e0849ed..4f21be4 100644 --- a/src/PublicKey/Rsa/PrivateKey.php +++ b/src/PublicKey/Rsa/PrivateKey.php @@ -3,8 +3,6 @@ * 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) - * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Crypt */ diff --git a/src/PublicKey/Rsa/PublicKey.php b/src/PublicKey/Rsa/PublicKey.php index a220446..c95b565 100644 --- a/src/PublicKey/Rsa/PublicKey.php +++ b/src/PublicKey/Rsa/PublicKey.php @@ -3,8 +3,6 @@ * 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) - * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Crypt */ diff --git a/src/PublicKey/RsaOptions.php b/src/PublicKey/RsaOptions.php index 4cdfaf7..ca6d02e 100644 --- a/src/PublicKey/RsaOptions.php +++ b/src/PublicKey/RsaOptions.php @@ -3,8 +3,6 @@ * 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) - * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Crypt */ diff --git a/src/Symmetric/Exception/ExceptionInterface.php b/src/Symmetric/Exception/ExceptionInterface.php index 4caac25..2630454 100644 --- a/src/Symmetric/Exception/ExceptionInterface.php +++ b/src/Symmetric/Exception/ExceptionInterface.php @@ -3,8 +3,6 @@ * 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) - * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Crypt */ @@ -15,8 +13,6 @@ /** * @category Zend * @package Zend_Crypt - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License */ interface ExceptionInterface extends Exception -{} \ No newline at end of file +{} diff --git a/src/Symmetric/Exception/InvalidArgumentException.php b/src/Symmetric/Exception/InvalidArgumentException.php index 4e6e49a..d721ee3 100644 --- a/src/Symmetric/Exception/InvalidArgumentException.php +++ b/src/Symmetric/Exception/InvalidArgumentException.php @@ -3,8 +3,6 @@ * 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) - * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Crypt */ namespace Zend\Crypt\Symmetric\Exception; @@ -17,8 +15,6 @@ * @category Zend * @package Zend_Crypt * @subpackage Exception - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License */ class InvalidArgumentException extends Exception\InvalidArgumentException implements ExceptionInterface diff --git a/src/Symmetric/Exception/RuntimeException.php b/src/Symmetric/Exception/RuntimeException.php index 973f457..eb88dfa 100644 --- a/src/Symmetric/Exception/RuntimeException.php +++ b/src/Symmetric/Exception/RuntimeException.php @@ -3,8 +3,6 @@ * 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) - * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Crypt */ @@ -18,8 +16,6 @@ * @category Zend * @package Zend_Crypt * @subpackage Exception - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License */ class RuntimeException extends Exception\RuntimeException implements ExceptionInterface diff --git a/src/Symmetric/Mcrypt.php b/src/Symmetric/Mcrypt.php index 9a91195..330d672 100644 --- a/src/Symmetric/Mcrypt.php +++ b/src/Symmetric/Mcrypt.php @@ -3,8 +3,6 @@ * 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) - * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Crypt */ diff --git a/src/Symmetric/Padding/PaddingInterface.php b/src/Symmetric/Padding/PaddingInterface.php index c2bf015..7f6b313 100644 --- a/src/Symmetric/Padding/PaddingInterface.php +++ b/src/Symmetric/Padding/PaddingInterface.php @@ -3,8 +3,6 @@ * 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) - * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Crypt */ namespace Zend\Crypt\Symmetric\Padding; diff --git a/src/Symmetric/Padding/Pkcs7.php b/src/Symmetric/Padding/Pkcs7.php index a3cb3c0..dfdf399 100644 --- a/src/Symmetric/Padding/Pkcs7.php +++ b/src/Symmetric/Padding/Pkcs7.php @@ -3,8 +3,6 @@ * 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) - * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Crypt */ namespace Zend\Crypt\Symmetric\Padding; @@ -14,8 +12,6 @@ * * @category Zend * @package Zend_Crypt - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License */ class Pkcs7 implements PaddingInterface { diff --git a/src/Symmetric/PaddingPluginManager.php b/src/Symmetric/PaddingPluginManager.php index 703077a..5668bab 100644 --- a/src/Symmetric/PaddingPluginManager.php +++ b/src/Symmetric/PaddingPluginManager.php @@ -15,8 +15,6 @@ * @category Zend * @package Zend_Crypt * @subpackage Symmetric - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License */ namespace Zend\Crypt\Symmetric; @@ -33,8 +31,6 @@ * @category Zend * @package Zend_Crypt * @subpackage Symmetric - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License */ class PaddingPluginManager extends AbstractPluginManager { diff --git a/src/Symmetric/SymmetricInterface.php b/src/Symmetric/SymmetricInterface.php index 7c565e3..a82cbb8 100644 --- a/src/Symmetric/SymmetricInterface.php +++ b/src/Symmetric/SymmetricInterface.php @@ -3,8 +3,6 @@ * 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) - * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Crypt */ namespace Zend\Crypt\Symmetric; diff --git a/src/SymmetricPluginManager.php b/src/SymmetricPluginManager.php index 13e18f7..9c30bb6 100644 --- a/src/SymmetricPluginManager.php +++ b/src/SymmetricPluginManager.php @@ -14,8 +14,6 @@ * * @category Zend * @package Zend_Crypt - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License */ namespace Zend\Crypt; @@ -31,8 +29,6 @@ * * @category Zend * @package Zend_Crypt - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License */ class SymmetricPluginManager extends AbstractPluginManager { diff --git a/src/Utils.php b/src/Utils.php index 2ec812f..01dfffa 100644 --- a/src/Utils.php +++ b/src/Utils.php @@ -3,8 +3,6 @@ * 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) - * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Crypt */ namespace Zend\Crypt; @@ -14,8 +12,6 @@ * * @category Zend * @package Zend_Crypt - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License */ class Utils { From e79c05614cec0c0e9603d4307f1f4a84694318bb Mon Sep 17 00:00:00 2001 From: Maks3w Date: Mon, 9 Jul 2012 16:19:42 +0200 Subject: [PATCH 2/8] [CS][Library] Set File Header http://framework.zend.com/wiki/display/ZFDEV2/Coding+Standards#CodingStandards-Files The following script replaces the content between PHP open tag and namespace declaration. for COMPONENT in $(ls -d *) do for FILE in $(find $COMPONENT -name "*.php") do BLOCK="\/\*\*\n \* Zend Framework \(http:\/\/framework\.zend\.com\/\)\n \*\n \* \@link http:\/\/github\.com\/zendframework\/zf2 for the canonical source repository\n \* \@copyright Copyright \(c\) 2005-2012 Zend Technologies USA Inc\. \(http:\/\/www\.zend\.com\)\n \* \@license http:\/\/framework\.zend\.com\/license\/new-bsd New BSD License\n \* \@package Zend_$COMPONENT\n \*\/" perl -0777 -i -pe "s/(<\?php(\s*.*)*\nn)/ Date: Mon, 9 Jul 2012 16:34:21 +0200 Subject: [PATCH 3/8] [CS][test] Remove @copyright & @license for fl in $(find . -name "*.php"); do mv $fl $fl.old; sed '/@copyright/d' $fl.old > $fl; rm -f $fl.old; done; for fl in $(find . -name "*.php"); do mv $fl $fl.old; sed '/@license/d' $fl.old > $fl; rm -f $fl.old; done; --- test/BlockCipherTest.php | 4 ---- test/HashTest.php | 4 ---- test/HmacTest.php | 4 ---- test/Key/Derivation/Pbkdf2Test.php | 4 ---- test/Key/Derivation/SaltedS2kTest.php | 4 ---- test/Password/BcryptTest.php | 4 ---- test/PublicKey/DiffieHellmanTest.php | 4 ---- test/PublicKey/RsaTest.php | 4 ---- test/Symmetric/McryptTest.php | 4 ---- test/Symmetric/Padding/Pkcs7Test.php | 4 ---- test/UtilsTest.php | 4 ---- 11 files changed, 44 deletions(-) diff --git a/test/BlockCipherTest.php b/test/BlockCipherTest.php index 91f75ec..4671917 100644 --- a/test/BlockCipherTest.php +++ b/test/BlockCipherTest.php @@ -15,8 +15,6 @@ * @category Zend * @package Zend_Crypt * @subpackage UnitTests - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License */ namespace ZendTest\Crypt; @@ -29,8 +27,6 @@ * @category Zend * @package Zend_Crypt * @subpackage UnitTests - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License * @group Zend_Crypt */ class BlockCipherTest extends \PHPUnit_Framework_TestCase diff --git a/test/HashTest.php b/test/HashTest.php index c751de8..8bac05d 100644 --- a/test/HashTest.php +++ b/test/HashTest.php @@ -15,8 +15,6 @@ * @category Zend * @package Zend_Crypt * @subpackage UnitTests - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License */ namespace ZendTest\Crypt; @@ -31,8 +29,6 @@ * @category Zend * @package Zend_Crypt * @subpackage UnitTests - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License * @group Zend_Crypt */ class HashTest extends \PHPUnit_Framework_TestCase diff --git a/test/HmacTest.php b/test/HmacTest.php index 8b9a981..57e58b7 100644 --- a/test/HmacTest.php +++ b/test/HmacTest.php @@ -15,8 +15,6 @@ * @category Zend * @package Zend_Crypt * @subpackage UnitTests - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License */ namespace ZendTest\Crypt; @@ -31,8 +29,6 @@ * @category Zend * @package Zend_Crypt * @subpackage UnitTests - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License * @group Zend_Crypt */ class HmacTest extends \PHPUnit_Framework_TestCase diff --git a/test/Key/Derivation/Pbkdf2Test.php b/test/Key/Derivation/Pbkdf2Test.php index 7de797e..204e36d 100644 --- a/test/Key/Derivation/Pbkdf2Test.php +++ b/test/Key/Derivation/Pbkdf2Test.php @@ -15,8 +15,6 @@ * @category Zend * @package Zend_Crypt * @subpackage UnitTests - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License */ namespace ZendTest\Crypt\Key\Derivation; @@ -27,8 +25,6 @@ * @category Zend * @package Zend_Crypt * @subpackage UnitTests - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License */ class Pbkdf2Test extends \PHPUnit_Framework_TestCase { diff --git a/test/Key/Derivation/SaltedS2kTest.php b/test/Key/Derivation/SaltedS2kTest.php index 6298006..bfa627a 100644 --- a/test/Key/Derivation/SaltedS2kTest.php +++ b/test/Key/Derivation/SaltedS2kTest.php @@ -15,8 +15,6 @@ * @category Zend * @package Zend_Crypt * @subpackage UnitTests - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License */ namespace ZendTest\Crypt\Key\Derivation; @@ -27,8 +25,6 @@ * @category Zend * @package Zend_Crypt * @subpackage UnitTests - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License * @group Zend_Crypt */ class SaltedS2kTest extends \PHPUnit_Framework_TestCase diff --git a/test/Password/BcryptTest.php b/test/Password/BcryptTest.php index f522315..fd1ce7f 100644 --- a/test/Password/BcryptTest.php +++ b/test/Password/BcryptTest.php @@ -15,8 +15,6 @@ * @category Zend * @package Zend_Crypt * @subpackage UnitTests - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License */ namespace ZendTest\Crypt\Password; @@ -29,8 +27,6 @@ * @category Zend * @package Zend_Crypt * @subpackage UnitTests - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License * @group Zend_Crypt */ class BcryptTest extends \PHPUnit_Framework_TestCase diff --git a/test/PublicKey/DiffieHellmanTest.php b/test/PublicKey/DiffieHellmanTest.php index a7ab3bb..3f76b2f 100644 --- a/test/PublicKey/DiffieHellmanTest.php +++ b/test/PublicKey/DiffieHellmanTest.php @@ -15,8 +15,6 @@ * @category Zend * @package Zend_Crypt * @subpackage UnitTests - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License */ namespace ZendTest\Crypt; @@ -29,8 +27,6 @@ * @category Zend * @package Zend_Crypt * @subpackage UnitTests - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License * @group Zend_Crypt */ class DiffieHellmanTest extends \PHPUnit_Framework_TestCase diff --git a/test/PublicKey/RsaTest.php b/test/PublicKey/RsaTest.php index e45b8fc..c2c79e9 100644 --- a/test/PublicKey/RsaTest.php +++ b/test/PublicKey/RsaTest.php @@ -15,8 +15,6 @@ * @category Zend * @package Zend_Crypt * @subpackage UnitTests - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License */ namespace ZendTest\Crypt; @@ -29,8 +27,6 @@ * @category Zend * @package Zend_Crypt * @subpackage UnitTests - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License * @group Zend_Crypt */ class RsaTest extends \PHPUnit_Framework_TestCase diff --git a/test/Symmetric/McryptTest.php b/test/Symmetric/McryptTest.php index 7659535..018a06d 100644 --- a/test/Symmetric/McryptTest.php +++ b/test/Symmetric/McryptTest.php @@ -15,8 +15,6 @@ * @category Zend * @package Zend_Crypt * @subpackage UnitTests - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License */ namespace ZendTest\Crypt\Symmetric; @@ -30,8 +28,6 @@ * @category Zend * @package Zend_Crypt * @subpackage UnitTests - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License * @group Zend_Crypt */ class McryptTest extends \PHPUnit_Framework_TestCase diff --git a/test/Symmetric/Padding/Pkcs7Test.php b/test/Symmetric/Padding/Pkcs7Test.php index 1a433d4..a7b3cfe 100644 --- a/test/Symmetric/Padding/Pkcs7Test.php +++ b/test/Symmetric/Padding/Pkcs7Test.php @@ -15,8 +15,6 @@ * @category Zend * @package Zend_Crypt * @subpackage UnitTests - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License */ namespace ZendTest\Crypt\Symmetric\Padding; @@ -27,8 +25,6 @@ * @category Zend * @package Zend_Crypt * @subpackage UnitTests - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License */ class Pkcs7Test extends \PHPUnit_Framework_TestCase { diff --git a/test/UtilsTest.php b/test/UtilsTest.php index fe9bf64..afbb53b 100644 --- a/test/UtilsTest.php +++ b/test/UtilsTest.php @@ -15,8 +15,6 @@ * @category Zend * @package Zend_Crypt * @subpackage UnitTests - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License */ namespace ZendTest\Crypt; @@ -32,8 +30,6 @@ * @category Zend * @package Zend_Crypt * @subpackage UnitTests - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License * @group Zend_Crypt */ class UtilsTest extends \PHPUnit_Framework_TestCase From 66fbf7848726512f94bb41abc4071ef31a169dcd Mon Sep 17 00:00:00 2001 From: Maks3w Date: Mon, 9 Jul 2012 16:41:27 +0200 Subject: [PATCH 4/8] [CS][Tests] Set File Header http://framework.zend.com/wiki/display/ZFDEV2/Coding+Standards#CodingStandards-Files The following script replaces the content between PHP open tag and namespace declaration. for COMPONENT in $(ls -d *) do for FILE in $(find $COMPONENT -name "*.php") do BLOCK="\/\*\*\n \* Zend Framework \(http:\/\/framework\.zend\.com\/\)\n \*\n \* \@link http:\/\/github\.com\/zendframework\/zf2 for the canonical source repository\n \* \@copyright Copyright \(c\) 2005-2012 Zend Technologies USA Inc\. \(http:\/\/www\.zend\.com\)\n \* \@license http:\/\/framework\.zend\.com\/license\/new-bsd New BSD License\n \* \@package Zend_$COMPONENT\n \*\/" perl -0777 -i -pe "s/(<\?php(\s*.*)*\nn)/ Date: Mon, 9 Jul 2012 16:46:59 -0500 Subject: [PATCH 5/8] [zen-49] Correct import statements across framework - Ran a script that would create multiple import statements out of multi-line import statements, and which would sort all import statements in alphabetic order. Script is at https://gist.github.com/3079222 and was run by dropping into the library/Zend folder and typing (in zsh) "for file in **/*.php;do php /path/to/replace-uses.php $file; done" --- src/BlockCipher.php | 4 ++-- src/Password/Bcrypt.php | 4 ++-- src/PublicKey/Rsa.php | 2 +- src/PublicKey/RsaOptions.php | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/BlockCipher.php b/src/BlockCipher.php index 44f5884..f32620c 100644 --- a/src/BlockCipher.php +++ b/src/BlockCipher.php @@ -10,10 +10,10 @@ namespace Zend\Crypt; -use Zend\Crypt\Symmetric\SymmetricInterface; use Zend\Crypt\Hmac; -use Zend\Crypt\Utils; use Zend\Crypt\Key\Derivation\Pbkdf2; +use Zend\Crypt\Symmetric\SymmetricInterface; +use Zend\Crypt\Utils; use Zend\Math\Math; /** diff --git a/src/Password/Bcrypt.php b/src/Password/Bcrypt.php index 99b13b5..c8607bf 100644 --- a/src/Password/Bcrypt.php +++ b/src/Password/Bcrypt.php @@ -10,10 +10,10 @@ namespace Zend\Crypt\Password; -use Zend\Math\Math; use Traversable; -use Zend\Stdlib\ArrayUtils; use Zend\Math\Exception as MathException; +use Zend\Math\Math; +use Zend\Stdlib\ArrayUtils; /** * Bcrypt algorithm using crypt() function of PHP diff --git a/src/PublicKey/Rsa.php b/src/PublicKey/Rsa.php index 9588aef..a76eaa0 100644 --- a/src/PublicKey/Rsa.php +++ b/src/PublicKey/Rsa.php @@ -10,10 +10,10 @@ namespace Zend\Crypt\PublicKey; +use Traversable; use Zend\Crypt\PublicKey\RsaOptions; use Zend\Crypt\PublicKey\Rsa\Exception; use Zend\Stdlib\ArrayUtils; -use Traversable; /** * Implementation of the RSA public key encryption algorithm. diff --git a/src/PublicKey/RsaOptions.php b/src/PublicKey/RsaOptions.php index 4cdfaf7..75613f0 100644 --- a/src/PublicKey/RsaOptions.php +++ b/src/PublicKey/RsaOptions.php @@ -10,10 +10,10 @@ namespace Zend\Crypt\PublicKey; -use Zend\Stdlib\AbstractOptions; +use Traversable; use Zend\Crypt\PublicKey\Rsa\Exception; +use Zend\Stdlib\AbstractOptions; use Zend\Stdlib\ArrayUtils; -use Traversable; /** * RSA instance options From a40cc7f84488b2a83b013ba44042d820f6089091 Mon Sep 17 00:00:00 2001 From: Maks3w Date: Thu, 12 Jul 2012 21:11:36 +0200 Subject: [PATCH 6/8] [PSR-2] fixers=braces,elseif,short_tag,php_closing_tag,trailing_spaces,linefeed Applied php-cs-fixer --fixers=braces,elseif,short_tag,php_closing_tag,trailing_spaces,linefeed --- .../Exception/InvalidArgumentException.php | 2 +- src/Key/Derivation/Exception/RuntimeException.php | 2 +- src/Key/Derivation/Pbkdf2.php | 4 ++-- src/Password/Bcrypt.php | 4 ++-- src/Password/Exception/InvalidArgumentException.php | 2 +- src/Password/Exception/RuntimeException.php | 2 +- src/Symmetric/Exception/InvalidArgumentException.php | 2 +- src/Symmetric/Exception/RuntimeException.php | 2 +- src/Symmetric/PaddingPluginManager.php | 10 +++++----- src/SymmetricPluginManager.php | 10 +++++----- test/BlockCipherTest.php | 4 ++-- test/Key/Derivation/Pbkdf2Test.php | 6 +++--- test/Password/BcryptTest.php | 6 +++--- test/PublicKey/DiffieHellmanTest.php | 12 ++++++------ test/PublicKey/RsaTest.php | 4 ++-- 15 files changed, 36 insertions(+), 36 deletions(-) diff --git a/src/Key/Derivation/Exception/InvalidArgumentException.php b/src/Key/Derivation/Exception/InvalidArgumentException.php index 6982dd6..b9d8abd 100644 --- a/src/Key/Derivation/Exception/InvalidArgumentException.php +++ b/src/Key/Derivation/Exception/InvalidArgumentException.php @@ -19,6 +19,6 @@ * @package Zend_Crypt * @subpackage Exception */ -class InvalidArgumentException extends Exception\InvalidArgumentException implements +class InvalidArgumentException extends Exception\InvalidArgumentException implements ExceptionInterface {} diff --git a/src/Key/Derivation/Exception/RuntimeException.php b/src/Key/Derivation/Exception/RuntimeException.php index a7bedfc..6339f99 100644 --- a/src/Key/Derivation/Exception/RuntimeException.php +++ b/src/Key/Derivation/Exception/RuntimeException.php @@ -19,6 +19,6 @@ * @package Zend_Crypt * @subpackage Exception */ -class RuntimeException extends Exception\RuntimeException implements +class RuntimeException extends Exception\RuntimeException implements ExceptionInterface {} diff --git a/src/Key/Derivation/Pbkdf2.php b/src/Key/Derivation/Pbkdf2.php index fa187b6..2fb2810 100644 --- a/src/Key/Derivation/Pbkdf2.php +++ b/src/Key/Derivation/Pbkdf2.php @@ -40,10 +40,10 @@ public static function calc($hash, $password, $salt, $iterations, $length) $result = ''; for ($block = 1; $block <= $num; $block++) { $hmac = Hmac::compute($password, $hash, $salt . pack('N', $block), Hmac::OUTPUT_BINARY); - $mix = $hmac; + $mix = $hmac; for ($i = 1; $i < $iterations; $i++) { $hmac = Hmac::compute($password, $hash, $hmac, Hmac::OUTPUT_BINARY); - $mix ^= $hmac; + $mix ^= $hmac; } $result .= $mix; } diff --git a/src/Password/Bcrypt.php b/src/Password/Bcrypt.php index c8607bf..9a3eb65 100644 --- a/src/Password/Bcrypt.php +++ b/src/Password/Bcrypt.php @@ -72,7 +72,7 @@ public function __construct($options = array()) public function create($password) { if (empty($this->salt)) { - $salt = Math::randBytes(self::MIN_SALT_SIZE); + $salt = Math::randBytes(self::MIN_SALT_SIZE); } else { $salt = $this->salt; } @@ -85,7 +85,7 @@ public function create($password) $prefix = '$2y$'; } else { $prefix = '$2a$'; - // check if the password contains 8-bit character + // check if the password contains 8-bit character if (preg_match('/[\x80-\xFF]/', $password)) { throw new Exception\RuntimeException( 'The bcrypt implementation used by PHP can contains a security flaw using password with 8-bit character. ' . diff --git a/src/Password/Exception/InvalidArgumentException.php b/src/Password/Exception/InvalidArgumentException.php index 7525d27..f70fea4 100644 --- a/src/Password/Exception/InvalidArgumentException.php +++ b/src/Password/Exception/InvalidArgumentException.php @@ -19,6 +19,6 @@ * @package Zend_Crypt * @subpackage Exception */ -class InvalidArgumentException extends Exception\InvalidArgumentException implements +class InvalidArgumentException extends Exception\InvalidArgumentException implements ExceptionInterface {} diff --git a/src/Password/Exception/RuntimeException.php b/src/Password/Exception/RuntimeException.php index 7f8d7f3..1775c29 100644 --- a/src/Password/Exception/RuntimeException.php +++ b/src/Password/Exception/RuntimeException.php @@ -19,6 +19,6 @@ * @package Zend_Crypt * @subpackage Exception */ -class RuntimeException extends Exception\RuntimeException implements +class RuntimeException extends Exception\RuntimeException implements ExceptionInterface {} diff --git a/src/Symmetric/Exception/InvalidArgumentException.php b/src/Symmetric/Exception/InvalidArgumentException.php index b550550..d8ef294 100644 --- a/src/Symmetric/Exception/InvalidArgumentException.php +++ b/src/Symmetric/Exception/InvalidArgumentException.php @@ -19,6 +19,6 @@ * @package Zend_Crypt * @subpackage Exception */ -class InvalidArgumentException extends Exception\InvalidArgumentException implements +class InvalidArgumentException extends Exception\InvalidArgumentException implements ExceptionInterface {} diff --git a/src/Symmetric/Exception/RuntimeException.php b/src/Symmetric/Exception/RuntimeException.php index 7e82cf8..35d3cc9 100644 --- a/src/Symmetric/Exception/RuntimeException.php +++ b/src/Symmetric/Exception/RuntimeException.php @@ -19,6 +19,6 @@ * @package Zend_Crypt * @subpackage Exception */ -class RuntimeException extends Exception\RuntimeException implements +class RuntimeException extends Exception\RuntimeException implements ExceptionInterface {} diff --git a/src/Symmetric/PaddingPluginManager.php b/src/Symmetric/PaddingPluginManager.php index 7f4ec9b..ddf9b61 100644 --- a/src/Symmetric/PaddingPluginManager.php +++ b/src/Symmetric/PaddingPluginManager.php @@ -16,7 +16,7 @@ * Plugin manager implementation for the padding adapter instances. * * Enforces that padding adapters retrieved are instances of - * Padding\PaddingInterface. Additionally, it registers a number of default + * Padding\PaddingInterface. Additionally, it registers a number of default * padding adapters available. * * @category Zend @@ -27,7 +27,7 @@ class PaddingPluginManager extends AbstractPluginManager { /** * Default set of padding adapters - * + * * @var array */ protected $invokableClasses = array( @@ -36,7 +36,7 @@ class PaddingPluginManager extends AbstractPluginManager /** * Do not share by default - * + * * @var bool */ protected $shareByDefault = false; @@ -45,8 +45,8 @@ class PaddingPluginManager extends AbstractPluginManager * Validate the plugin * * Checks that the padding adaper loaded is an instance of Padding\PaddingInterface. - * - * @param mixed $plugin + * + * @param mixed $plugin * @return void * @throws Exception\InvalidArgumentException if invalid */ diff --git a/src/SymmetricPluginManager.php b/src/SymmetricPluginManager.php index 666368e..c223b8e 100644 --- a/src/SymmetricPluginManager.php +++ b/src/SymmetricPluginManager.php @@ -16,7 +16,7 @@ * Plugin manager implementation for the symmetric adapter instances. * * Enforces that symmetric adapters retrieved are instances of - * Symmetric\SymmetricInterface. Additionally, it registers a number of default + * Symmetric\SymmetricInterface. Additionally, it registers a number of default * symmetric adapters available. * * @category Zend @@ -26,7 +26,7 @@ class SymmetricPluginManager extends AbstractPluginManager { /** * Default set of symmetric adapters - * + * * @var array */ protected $invokableClasses = array( @@ -35,7 +35,7 @@ class SymmetricPluginManager extends AbstractPluginManager /** * Do not share by default - * + * * @var bool */ protected $shareByDefault = false; @@ -45,8 +45,8 @@ class SymmetricPluginManager extends AbstractPluginManager * * Checks that the adapter loaded is an instance * of Symmetric\SymmetricInterface. - * - * @param mixed $plugin + * + * @param mixed $plugin * @return void * @throws Exception\InvalidArgumentException if invalid */ diff --git a/test/BlockCipherTest.php b/test/BlockCipherTest.php index 66119dd..b8bc2c3 100644 --- a/test/BlockCipherTest.php +++ b/test/BlockCipherTest.php @@ -22,8 +22,8 @@ */ class BlockCipherTest extends \PHPUnit_Framework_TestCase { - /** - * @var BlockCipher + /** + * @var BlockCipher */ protected $blockCipher; protected $plaintext; diff --git a/test/Key/Derivation/Pbkdf2Test.php b/test/Key/Derivation/Pbkdf2Test.php index facb2e3..88ebb8d 100644 --- a/test/Key/Derivation/Pbkdf2Test.php +++ b/test/Key/Derivation/Pbkdf2Test.php @@ -44,8 +44,8 @@ public function testCalcWithWrongHash() /** * Test vectors from RFC 6070 - * - * @see http://tools.ietf.org/html/draft-josefsson-pbkdf2-test-vectors-06 + * + * @see http://tools.ietf.org/html/draft-josefsson-pbkdf2-test-vectors-06 */ public static function provideTestVectors() { @@ -59,7 +59,7 @@ public static function provideTestVectors() } /** - * @dataProvider provideTestVectors + * @dataProvider provideTestVectors */ public function testRFC670($hash, $password, $salt, $cycles, $length, $expect) { diff --git a/test/Password/BcryptTest.php b/test/Password/BcryptTest.php index 780d390..b875a37 100644 --- a/test/Password/BcryptTest.php +++ b/test/Password/BcryptTest.php @@ -41,7 +41,7 @@ public function setUp() } else { $this->prefix = '$2a$'; } - $this->bcryptPassword = $this->prefix . '14$MTIzNDU2Nzg5MDEyMzQ1NeWUUefVlefsTbFhsbqKFv/vPSZBrSFVm'; + $this->bcryptPassword = $this->prefix . '14$MTIzNDU2Nzg5MDEyMzQ1NeWUUefVlefsTbFhsbqKFv/vPSZBrSFVm'; } public function testConstructByOptions() @@ -121,12 +121,12 @@ public function testVerify() $this->assertTrue($this->bcrypt->verify($this->password, $this->bcryptPassword)); $this->assertFalse($this->bcrypt->verify(substr($this->password, -1), $this->bcryptPassword)); } - + public function testPasswordWith8bitCharacter() { $password = 'test' . chr(128); $this->bcrypt->setSalt($this->salt); - + if (version_compare(PHP_VERSION, '5.3.7') >= 0) { $this->assertEquals('$2y$14$MTIzNDU2Nzg5MDEyMzQ1NexAbOIUHkG6Ra.TK9QxHOVUhDxOe4dkW', $this->bcrypt->create($password)); } else { diff --git a/test/PublicKey/DiffieHellmanTest.php b/test/PublicKey/DiffieHellmanTest.php index 06c8890..fa2d6e2 100644 --- a/test/PublicKey/DiffieHellmanTest.php +++ b/test/PublicKey/DiffieHellmanTest.php @@ -52,7 +52,7 @@ public function testWithSpec() DiffieHellman::useOpensslExtension(false); $alice = new DiffieHellman($aliceOptions['prime'], $aliceOptions['generator'], $aliceOptions['private']); $bob = new DiffieHellman($bobOptions['prime'], $bobOptions['generator'], $bobOptions['private']); - + $alice->generateKeys(); $bob->generateKeys(); @@ -81,10 +81,10 @@ public function testWithBinaryFormsAndLargeIntegers() ); DiffieHellman::useOpensslExtension(false); - + $alice = new DiffieHellman($aliceOptions['prime'], $aliceOptions['generator'], $aliceOptions['private']); $bob = new DiffieHellman($bobOptions['prime'], $bobOptions['generator'], $bobOptions['private']); - + $alice->generateKeys(); $bob->generateKeys(); @@ -103,7 +103,7 @@ public function testWithBinaryFormsAndLargeIntegers() // both Alice and Bob should now have the same secret key $expectedSharedSecret = base64_decode('FAAkw7NN1+raX9K1+dR3nqX2LZcDYYuZH13lpasaDIM4/ZXqbzdgiHZ86SILN27BjmJObtNQG/SNHfhxMalLMtLv+v0JFte/6+pIvMG9tAoPFsVh2BAvBuNpLY5W5gusgQ2p4pvJK0wz9YJ8iFdOHEOnhzYuN7LS/YXx2rBOz0Q='); - + $this->assertEquals($expectedSharedSecret, $aliceSecretKey); $this->assertEquals($expectedSharedSecret, $bobSecretKey); } @@ -132,10 +132,10 @@ public function testWithBinaryFormsAndLargeIntegersAndOpenssl() $alice = new DiffieHellman($aliceOptions['prime'], $aliceOptions['generator'], $aliceOptions['private']); $bob = new DiffieHellman($bobOptions['prime'], $bobOptions['generator'], $bobOptions['private']); - + $alice->generateKeys(); $bob->generateKeys(); - + $this->assertEquals('0DmJUe9dr02pAtVoGyLHdC+rfBU3mDCelKGPXRDFHofx6mFfN2gcZCmp/ab4ezDXfpIBOatpVdbn2fTNUGo64DtKE2WGTsZCl90RgrGUv8XW/4WDPXeE7g5u7KWHBG/LCE5+XsilE5P5/GIyqr9gsiudTmk+H/hiYZl9Smar9k0=', base64_encode($alice->getPublicKey(DiffieHellman::FORMAT_BINARY))); $this->assertEquals('v8puCBaHdch0stxmkyS/sZvZHyB5f0AVkopAQ5wKSZIyEHHcGn7DXXH2u4WdCL+kMr8BcRpxRBJ0TDwfZPpu53nFNEjUd81WlfaKk95e4a/DC4dhlfBkQMebleobhedQPFAo7F9SkHN7uTLa/glxG+3T9DTb+ikcOVPoH3A1G6g=', diff --git a/test/PublicKey/RsaTest.php b/test/PublicKey/RsaTest.php index 2b77964..518728e 100644 --- a/test/PublicKey/RsaTest.php +++ b/test/PublicKey/RsaTest.php @@ -46,7 +46,7 @@ class RsaTest extends \PHPUnit_Framework_TestCase /** @var Rsa */ protected $rsa; - + /** @var Rsa */ protected $rsaBase64Out; @@ -141,7 +141,7 @@ public function testFacrotyCreatesInstance() )); $this->assertInstanceOf('Zend\Crypt\PublicKey\Rsa', $rsa); $this->assertInstanceOf('Zend\Crypt\PublicKey\RsaOptions', $rsa->getOptions()); - } + } public function testFacrotyCreatesKeys() { From 522f3e501dcc63ad84184d421d85e905a7b7b6a9 Mon Sep 17 00:00:00 2001 From: Denis Portnov Date: Tue, 24 Jul 2012 00:53:28 +0400 Subject: [PATCH 7/8] fixed DiffieHellman and Csrf validator --- src/PublicKey/DiffieHellman.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/PublicKey/DiffieHellman.php b/src/PublicKey/DiffieHellman.php index ce26a21..97ce608 100644 --- a/src/PublicKey/DiffieHellman.php +++ b/src/PublicKey/DiffieHellman.php @@ -64,7 +64,7 @@ class DiffieHellman private $privateKey = null; /** - * BigInteger support object courtesy of Zend\Math\Math + * BigInteger support object courtesy of Zend\Math * * @var \Zend\Math\BigInteger\Adapter\AdapterInterface */ @@ -438,7 +438,6 @@ protected function convert($number, $inputFormat = self::FORMAT_NUMBER, */ protected function generatePrivateKey() { - $rand = Math\Math::randBytes(strlen($this->getPrime()), true); - return $rand; + return Math\Rand::getBytes(strlen($this->getPrime()), true); } } From a277ee361ff3dd3a0df76fd7d2b334910c0d480c Mon Sep 17 00:00:00 2001 From: Denis Portnov Date: Tue, 24 Jul 2012 20:35:16 +0400 Subject: [PATCH 8/8] fixed bcrypt test --- src/Password/Bcrypt.php | 2 +- test/Password/BcryptTest.php | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Password/Bcrypt.php b/src/Password/Bcrypt.php index d24900f..b80ab50 100644 --- a/src/Password/Bcrypt.php +++ b/src/Password/Bcrypt.php @@ -90,7 +90,7 @@ public function create($password) // check if the password contains 8-bit character if (preg_match('/[\x80-\xFF]/', $password)) { throw new Exception\RuntimeException( - 'The bcrypt implementation used by PHP can contains a security flaw' . + 'The bcrypt implementation used by PHP can contains a security flaw ' . 'using password with 8-bit character. ' . 'We suggest to upgrade to PHP 5.3.7+ or use passwords with only 7-bit characters' ); diff --git a/test/Password/BcryptTest.php b/test/Password/BcryptTest.php index 8ffeddd..7b37dd7 100644 --- a/test/Password/BcryptTest.php +++ b/test/Password/BcryptTest.php @@ -128,10 +128,12 @@ public function testPasswordWith8bitCharacter() $this->bcrypt->setSalt($this->salt); if (version_compare(PHP_VERSION, '5.3.7') >= 0) { - $this->assertEquals('$2y$14$MTIzNDU2Nzg5MDEyMzQ1NexAbOIUHkG6Ra.TK9QxHOVUhDxOe4dkW', $this->bcrypt->create($password)); + $this->assertEquals('$2y$14$MTIzNDU2Nzg5MDEyMzQ1NexAbOIUHkG6Ra.TK9QxHOVUhDxOe4dkW', + $this->bcrypt->create($password)); } else { $this->setExpectedException('Zend\Crypt\Password\Exception\RuntimeException', - 'The bcrypt implementation used by PHP can contains a security flaw using password with 8-bit character. ' . + 'The bcrypt implementation used by PHP can contains a security flaw ' . + 'using password with 8-bit character. ' . 'We suggest to upgrade to PHP 5.3.7+ or use passwords with only 7-bit characters' ); $output = $this->bcrypt->create($password);