4
4
* See COPYING.txt for license details.
5
5
*/
6
6
7
- // @codingStandardsIgnoreFile
8
-
9
7
namespace Magento \Framework \Encryption ;
10
8
11
9
/**
@@ -47,8 +45,12 @@ class Crypt
47
45
* FALSE fills initial vector with zero bytes to not use it.
48
46
* @throws \Exception
49
47
*/
50
- public function __construct ($ key , $ cipher = MCRYPT_BLOWFISH , $ mode = MCRYPT_MODE_ECB , $ initVector = false )
51
- {
48
+ public function __construct (
49
+ $ key ,
50
+ $ cipher = MCRYPT_BLOWFISH ,
51
+ $ mode = MCRYPT_MODE_ECB ,
52
+ $ initVector = false
53
+ ) {
52
54
$ this ->_cipher = $ cipher ;
53
55
$ this ->_mode = $ mode ;
54
56
$ this ->_handle = mcrypt_module_open ($ cipher , '' , $ mode , '' );
@@ -72,7 +74,10 @@ public function __construct($key, $cipher = MCRYPT_BLOWFISH, $mode = MCRYPT_MODE
72
74
$ initVector = str_repeat ("\0" , $ initVectorSize );
73
75
} elseif (!is_string ($ initVector ) || strlen ($ initVector ) != $ initVectorSize ) {
74
76
throw new \Magento \Framework \Exception \LocalizedException (
75
- new \Magento \Framework \Phrase ('Init vector must be a string of %1 bytes. ' , [$ initVectorSize ])
77
+ new \Magento \Framework \Phrase (
78
+ 'Init vector must be a string of %1 bytes. ' ,
79
+ [$ initVectorSize ]
80
+ )
76
81
);
77
82
}
78
83
$ this ->_initVector = $ initVector ;
0 commit comments