For openssl_decrypt(), OPENSSL_RAW_DATA does NOT affect the representation of the returned data, but is used to indicate whether "data" (i.e., the ciphertext) is raw or base64-encoded. The function always returns the "plaintext" as-is.
I wonder if it's best to move the actual description to the functions, and to only document the constant to be used with openssl_encrypt() and openssl_decrpyt().
From manual page: https://php.net/openssl.constants.other
For
openssl_decrypt()
,OPENSSL_RAW_DATA
does NOT affect the representation of the returned data, but is used to indicate whether "data" (i.e., the ciphertext) is raw or base64-encoded. The function always returns the "plaintext" as-is.