mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-22 17:48:37 +08:00
more base64 workaround for openssl
This commit is contained in:
@@ -175,7 +175,8 @@ class Security extends Component
|
||||
$data = $this->addPadding($data);
|
||||
$ivSize = 16;
|
||||
$iv = $this->generateRandomKey($ivSize);
|
||||
$encrypted = openssl_encrypt($data, $this->opensslCipher(), $key, OPENSSL_RAW_DATA, $iv);
|
||||
$encrypted = openssl_encrypt($data, $this->opensslCipher(), $key, OPENSSL_ZERO_PADDING, $iv);
|
||||
$encrypted = base64_decode($encrypted);
|
||||
|
||||
$authKey = $this->hkdf(self::KDF_HASH, $key, null, self::AUTH_KEY_INFO, self::KEY_SIZE);
|
||||
$hashed = $this->hashData($iv . $encrypted, $authKey);
|
||||
|
||||
Reference in New Issue
Block a user