openssl_decrypt(): IV passed is 16 bytes long which is longer than the 8 expected by selected cipher, truncating in BF-CBC code example
Example 1: openssl_encrypt
$textToEncrypt = "My super secret information.";
$encryptionMethod = "AES-256-CBC";
$secretHash = "25c6c7ff35b9979b151f2136cd13b0ff";
$encryptedMessage = openssl_encrypt($textToEncrypt, $encryptionMethod, $secretHash);
$decryptedMessage = openssl_decrypt($encryptedMessage, $encryptionMethod, $secretHash);
echo "Encrypted: $encryptedMessage <br>Decrypted: $decryptedMessage";
Example 2: openssl_decrypt(): IV passed is 16 bytes long which is longer than the 8 expected by selected cipher, truncating in BF-CBC
openssl_decrypt(): IV passed is 16 bytes long which is longer than the 8 expected by selected cipher, truncating in BF-CBC