Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Description of OPENSSL_RAW_DATA is wrong #3826

Open
tomty89 opened this issue Oct 3, 2024 · 1 comment
Open

Description of OPENSSL_RAW_DATA is wrong #3826

tomty89 opened this issue Oct 3, 2024 · 1 comment
Labels
bug Documentation contains incorrect information

Comments

@tomty89
Copy link

tomty89 commented Oct 3, 2024

From manual page: https://php.net/openssl.constants.other

If OPENSSL_RAW_DATA is set in the openssl_encrypt() or openssl_decrypt(), the returned data is returned as-is. When it is not specified, Base64 encoded data is returned to the caller.


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.

@cmb69
Copy link
Member

cmb69 commented Oct 3, 2024

That makes sense. Thank you!

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().

@cmb69 cmb69 added the bug Documentation contains incorrect information label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Documentation contains incorrect information
Projects
None yet
Development

No branches or pull requests

2 participants