<?php openssl_cipher_iv_length(string $cipher_algo): int|false
<?php public function encrypt($value, $serialize = true) { $iv = random_bytes(openssl_cipher_iv_length(strtolower($this->cipher))); $value = \openssl_encrypt( $serialize ? serialize($value) : $value,
<?php return false; } return strlen(base64_decode($payload['iv'], true)) === openssl_cipher_iv_length(strtolower($this->cipher)); }