aboutsummaryrefslogtreecommitdiff
path: root/src/hex.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/hex.php')
-rw-r--r--src/hex.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/hex.php b/src/hex.php
index 2062d69..be7b01e 100644
--- a/src/hex.php
+++ b/src/hex.php
@@ -50,7 +50,8 @@ function decryptData($crypttext,$key,$txt='') {
return "";
}
$crypttext = base64_decode($crypttext);
- $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-cbc'));
+ $iv_size = openssl_cipher_iv_length('aes-256-cbc');
+ $iv = openssl_random_pseudo_bytes($iv_size);
$test1='';
$test2='x';
$clen = strlen($crypttext);