From ca9d4867f470fb754228cdfdc4fdf806b22b1e4d Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Tue, 29 Jul 2014 22:23:59 +0200 Subject: [PATCH] code style --- framework/base/Security.php | 31 ++++++++++++++++--------------- framework/caching/TagDependency.php | 1 - 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/framework/base/Security.php b/framework/base/Security.php index 1c753d4..0bd0ce9 100644 --- a/framework/base/Security.php +++ b/framework/base/Security.php @@ -30,20 +30,6 @@ use Yii; class Security extends Component { /** - * @var integer derivation iterations count. - * Set as high as possible to hinder dictionary password attacks. - */ - public $derivationIterations = 100000; - /** - * @var string strategy, which should be used to generate password hash. - * Available strategies: - * - 'password_hash' - use of PHP `password_hash()` function with PASSWORD_DEFAULT algorithm. - * This option is recommended, but it requires PHP version >= 5.5.0 - * - 'crypt' - use PHP `crypt()` function. - */ - public $passwordHashStrategy = 'crypt'; - - /** * Cipher algorithm for mcrypt module. * AES has 128-bit block size and three key sizes: 128, 192 and 256 bits. * mcrypt offers the Rijndael cipher with block sizes of 128, 192 and 256 @@ -73,8 +59,23 @@ class Security extends Component */ const AUTH_KEY_INFO = 'AuthorizationKey'; + /** + * @var integer derivation iterations count. + * Set as high as possible to hinder dictionary password attacks. + */ + public $derivationIterations = 100000; + /** + * @var string strategy, which should be used to generate password hash. + * Available strategies: + * - 'password_hash' - use of PHP `password_hash()` function with PASSWORD_DEFAULT algorithm. + * This option is recommended, but it requires PHP version >= 5.5.0 + * - 'crypt' - use PHP `crypt()` function. + */ + public $passwordHashStrategy = 'crypt'; + private $_cryptModule; + /** * Encrypts data using a password. * Derives keys for encryption and authentication from the password using PBKDF2 and a random salt, @@ -178,7 +179,7 @@ class Security extends Component * @param bool $passwordBased set true to use password-based key derivation * @param string $secret the encryption password or key * @param string $info context/application specific information, e.g. a user ID - * See RFC 5869 Section 3.2 @link https://tools.ietf.org/html/rfc5869 + * See [RFC 5869 Section 3.2](https://tools.ietf.org/html/rfc5869#section-3.2) for more details. * @return string the encrypted data * @throws Exception if PHP Mcrypt extension is not loaded or failed to be initialized * @see decrypt() diff --git a/framework/caching/TagDependency.php b/framework/caching/TagDependency.php index 5a6c487..006eb68 100644 --- a/framework/caching/TagDependency.php +++ b/framework/caching/TagDependency.php @@ -7,7 +7,6 @@ namespace yii\caching; - /** * TagDependency associates a cached data item with one or multiple [[tags]]. *