I am trying to Use the Padding Mode: Zeros in AES-256-ECB encryption
but when i use OPENSSL_ZERO_PADDING it does not return anything.
this is the code :
$plaintext = "The quick brown fox jumps over the lazy dog";
$key = 'd61d2cd58d01b234e1800938erf8467k';
$chiperRaw = openssl_encrypt($plaintext, $cipher, $key, OPENSSL_ZERO_PADDING);
$ciphertext = trim(base64_encode($chiperRaw));
echo($ciphertext);
But when i use OPENSSL_RAW_DATA instead of OPENSSL_ZERO_PADDING it returns the encrypted string
Why isnt the OPENSSL_ZERO_PADDING working ? how can i fix this ?