[DOC-CVS] [doc-en] master: Fix OPENSSL_RAW_DATA description for encrypt/decrypt (#5268)

[email protected] (Louis-Arnaud via GitHub)
Newsgroups php.doc.cvs
Message-ID <[email protected]>
Author: Louis-Arnaud (lacatoire)
Committer: GitHub (web-flow)
Pusher: lacatoire
Date: 2026-08-19T12:07:27+02:00

Commit: https://github.com/php/doc-en/commit/7179e95e592583beae2f99ca71e6b326f559812b
Raw diff: https://github.com/php/doc-en/commit/7179e95e592583beae2f99ca71e6b326f559812b.diff

Fix OPENSSL_RAW_DATA description for encrypt/decrypt (#5268)

* Fix OPENSSL_RAW_DATA description for encrypt/decrypt

Fixes #3826

* Apply suggestions

Co-authored-by: Louis-Arnaud <[email protected]>

Changed paths:
  M  reference/openssl/constants.xml
  M  reference/openssl/functions/openssl-decrypt.xml
  M  reference/openssl/functions/openssl-encrypt.xml


Diff:

diff --git a/reference/openssl/constants.xml b/reference/openssl/constants.xml
index 7771d9c1b348..fca9d78c90c0 100644
--- a/reference/openssl/constants.xml
+++ b/reference/openssl/constants.xml
@@ -855,10 +855,10 @@
       </term>
       <listitem>
         <simpara>
-         If <constant>OPENSSL_RAW_DATA</constant> is set in the
-         <function>openssl_encrypt</function> or <function>openssl_decrypt</function>,
-         the returned data is returned as-is.
-         When it is not specified, Base64 encoded data is returned to the caller.
+         Used with <function>openssl_encrypt</function> and
+         <function>openssl_decrypt</function> to indicate that data
+         should be in raw binary format rather than base64-encoded.
+         See the respective function descriptions for details.
         </simpara>
       </listitem>
     </varlistentry>
diff --git a/reference/openssl/functions/openssl-decrypt.xml b/reference/openssl/functions/openssl-decrypt.xml
index 8c0e62ab6685..1db682383b1b 100644
--- a/reference/openssl/functions/openssl-decrypt.xml
+++ b/reference/openssl/functions/openssl-decrypt.xml
@@ -65,12 +65,18 @@
     <varlistentry>
       <term><parameter>options</parameter></term>
       <listitem>
-       <para>
-        <parameter>options</parameter> can be one of
+       <simpara>
+        <parameter>options</parameter> is a bitwise disjunction of the flags
         <constant>OPENSSL_RAW_DATA</constant>,
-        <constant>OPENSSL_ZERO_PADDING</constant>
-        or <constant>OPENSSL_DONT_ZERO_PAD_KEY</constant>.
-       </para>
+        <constant>OPENSSL_ZERO_PADDING</constant>,
+        and <constant>OPENSSL_DONT_ZERO_PAD_KEY</constant>.
+       </simpara>
+       <simpara>
+        When <constant>OPENSSL_RAW_DATA</constant> is set,
+        <parameter>data</parameter> is expected to be raw binary
+        ciphertext. When it is not set, <parameter>data</parameter>
+        is expected to be base64-encoded.
+       </simpara>
       </listitem>
     </varlistentry>
     <varlistentry>
diff --git a/reference/openssl/functions/openssl-encrypt.xml b/reference/openssl/functions/openssl-encrypt.xml
index b729ebe58609..b9e2bf8335da 100644
--- a/reference/openssl/functions/openssl-encrypt.xml
+++ b/reference/openssl/functions/openssl-encrypt.xml
@@ -65,12 +65,17 @@
     <varlistentry>
       <term><parameter>options</parameter></term>
       <listitem>
-        <para>
+        <simpara>
           <parameter>options</parameter> is a bitwise disjunction of the flags
-          <constant>OPENSSL_RAW_DATA</constant>, and
-          <constant>OPENSSL_ZERO_PADDING</constant>
-          or <constant>OPENSSL_DONT_ZERO_PAD_KEY</constant>.
-        </para>
+          <constant>OPENSSL_RAW_DATA</constant>,
+          <constant>OPENSSL_ZERO_PADDING</constant>,
+          and <constant>OPENSSL_DONT_ZERO_PAD_KEY</constant>.
+         </simpara>
+         <simpara>
+          When <constant>OPENSSL_RAW_DATA</constant> is set, the
+          encrypted output is returned as raw binary data. When it
+          is not set, the return value is base64-encoded.
+        </simpara>
       </listitem>
     </varlistentry>
     <varlistentry>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.