OpenSSL Encryption / Decryption php
问题 I am doing encryption which is working good but with same method I am doing decryption I am getting blank string not getting decryption string. I am using method AES-256-ECB and key is hexadecimal so I pass as $key = pack('H*','xxxxxxxxxxxx'); Encryption is going correct but decryption is not working. Please help me what I am doing wrong. function encrypt(string $data, string $key, string $method): string { $ivSize = openssl_cipher_iv_length($method); $iv = openssl_random_pseudo_bytes($ivSize