Skip to content

Commit

Permalink
Document SensitiveParameter attributes - part 2 (#3403)
Browse files Browse the repository at this point in the history
  • Loading branch information
kocsismate authored May 21, 2024
1 parent 5bc68ad commit d76a7fe
Show file tree
Hide file tree
Showing 66 changed files with 92 additions and 110 deletions.
2 changes: 1 addition & 1 deletion reference/pdo/pdo/construct.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<modifier>public</modifier> <methodname>PDO::__construct</methodname>
<methodparam><type>string</type><parameter>dsn</parameter></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>username</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>password</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><modifier role="attribute">#[\SensitiveParameter]</modifier><type class="union"><type>string</type><type>null</type></type><parameter>password</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>array</type><type>null</type></type><parameter>options</parameter><initializer>&null;</initializer></methodparam>
</constructorsynopsis>
<para>
Expand Down
4 changes: 2 additions & 2 deletions reference/sodium/functions/sodium-base642bin.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="function.sodium-base642bin">
<refentry xml:id="function.sodium-base642bin" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>sodium_base642bin</refname>
<refpurpose>Decodes a base64-encoded string into raw binary.</refpurpose>
Expand All @@ -10,7 +10,7 @@
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>sodium_base642bin</methodname>
<methodparam><type>string</type><parameter>string</parameter></methodparam>
<methodparam><modifier role="attribute">#[\SensitiveParameter]</modifier><type>string</type><parameter>string</parameter></methodparam>
<methodparam><type>int</type><parameter>id</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>ignore</parameter><initializer>""</initializer></methodparam>
</methodsynopsis>
Expand Down
4 changes: 2 additions & 2 deletions reference/sodium/functions/sodium-bin2base64.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="function.sodium-bin2base64">
<refentry xml:id="function.sodium-bin2base64" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>sodium_bin2base64</refname>
<refpurpose>Encodes a raw binary string with base64.</refpurpose>
Expand All @@ -10,7 +10,7 @@
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>sodium_bin2base64</methodname>
<methodparam><type>string</type><parameter>string</parameter></methodparam>
<methodparam><modifier role="attribute">#[\SensitiveParameter]</modifier><type>string</type><parameter>string</parameter></methodparam>
<methodparam><type>int</type><parameter>id</parameter></methodparam>
</methodsynopsis>
<para>
Expand Down
4 changes: 2 additions & 2 deletions reference/sodium/functions/sodium-bin2hex.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="function.sodium-bin2hex">
<refentry xml:id="function.sodium-bin2hex" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>sodium_bin2hex</refname>
<refpurpose>Encode to hexadecimal</refpurpose>
Expand All @@ -10,7 +10,7 @@
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>sodium_bin2hex</methodname>
<methodparam><type>string</type><parameter>string</parameter></methodparam>
<methodparam><modifier role="attribute">#[\SensitiveParameter]</modifier><type>string</type><parameter>string</parameter></methodparam>
</methodsynopsis>
<para>
Converts a raw binary string into a hex-encoded string. Unlike the standard hex-encoding function,
Expand Down
4 changes: 2 additions & 2 deletions reference/sodium/functions/sodium-compare.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>sodium_compare</methodname>
<methodparam><type>string</type><parameter>string1</parameter></methodparam>
<methodparam><type>string</type><parameter>string2</parameter></methodparam>
<methodparam><modifier role="attribute">#[\SensitiveParameter]</modifier><type>string</type><parameter>string1</parameter></methodparam>
<methodparam><modifier role="attribute">#[\SensitiveParameter]</modifier><type>string</type><parameter>string2</parameter></methodparam>
</methodsynopsis>
<para>
Compare two strings as if they were arbitrary-length, unsigned little-endian integers, without side-channel leakage.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="function.sodium-crypto-aead-aes256gcm-decrypt">
<refentry xml:id="function.sodium-crypto-aead-aes256gcm-decrypt" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>sodium_crypto_aead_aes256gcm_decrypt</refname>
<refpurpose>Verify then decrypt a message with AES-256-GCM</refpurpose>
Expand All @@ -13,7 +13,7 @@
<methodparam><type>string</type><parameter>ciphertext</parameter></methodparam>
<methodparam><type>string</type><parameter>additional_data</parameter></methodparam>
<methodparam><type>string</type><parameter>nonce</parameter></methodparam>
<methodparam><type>string</type><parameter>key</parameter></methodparam>
<methodparam><modifier role="attribute">#[\SensitiveParameter]</modifier><type>string</type><parameter>key</parameter></methodparam>
</methodsynopsis>
<para>
Verify then decrypt with AES-256-GCM.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="function.sodium-crypto-aead-aes256gcm-encrypt">
<refentry xml:id="function.sodium-crypto-aead-aes256gcm-encrypt" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>sodium_crypto_aead_aes256gcm_encrypt</refname>
<refpurpose>Encrypt then authenticate with AES-256-GCM</refpurpose>
Expand All @@ -10,10 +10,10 @@
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>sodium_crypto_aead_aes256gcm_encrypt</methodname>
<methodparam><type>string</type><parameter>message</parameter></methodparam>
<methodparam><modifier role="attribute">#[\SensitiveParameter]</modifier><type>string</type><parameter>message</parameter></methodparam>
<methodparam><type>string</type><parameter>additional_data</parameter></methodparam>
<methodparam><type>string</type><parameter>nonce</parameter></methodparam>
<methodparam><type>string</type><parameter>key</parameter></methodparam>
<methodparam><modifier role="attribute">#[\SensitiveParameter]</modifier><type>string</type><parameter>key</parameter></methodparam>
</methodsynopsis>
<para>
Encrypt then authenticate with AES-256-GCM.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="function.sodium-crypto-aead-chacha20poly1305-decrypt">
<refentry xml:id="function.sodium-crypto-aead-chacha20poly1305-decrypt" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>sodium_crypto_aead_chacha20poly1305_decrypt</refname>
<refpurpose>Verify then decrypt with ChaCha20-Poly1305</refpurpose>
Expand All @@ -13,7 +13,7 @@
<methodparam><type>string</type><parameter>ciphertext</parameter></methodparam>
<methodparam><type>string</type><parameter>additional_data</parameter></methodparam>
<methodparam><type>string</type><parameter>nonce</parameter></methodparam>
<methodparam><type>string</type><parameter>key</parameter></methodparam>
<methodparam><modifier role="attribute">#[\SensitiveParameter]</modifier><type>string</type><parameter>key</parameter></methodparam>
</methodsynopsis>
<para>
Verify then decrypt with ChaCha20-Poly1305.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="function.sodium-crypto-aead-chacha20poly1305-encrypt">
<refentry xml:id="function.sodium-crypto-aead-chacha20poly1305-encrypt" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>sodium_crypto_aead_chacha20poly1305_encrypt</refname>
<refpurpose>Encrypt then authenticate with ChaCha20-Poly1305</refpurpose>
Expand All @@ -10,10 +10,10 @@
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>sodium_crypto_aead_chacha20poly1305_encrypt</methodname>
<methodparam><type>string</type><parameter>message</parameter></methodparam>
<methodparam><modifier role="attribute">#[\SensitiveParameter]</modifier><type>string</type><parameter>message</parameter></methodparam>
<methodparam><type>string</type><parameter>additional_data</parameter></methodparam>
<methodparam><type>string</type><parameter>nonce</parameter></methodparam>
<methodparam><type>string</type><parameter>key</parameter></methodparam>
<methodparam><modifier role="attribute">#[\SensitiveParameter]</modifier><type>string</type><parameter>key</parameter></methodparam>
</methodsynopsis>
<para>
Encrypt then authenticate with ChaCha20-Poly1305.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="function.sodium-crypto-aead-chacha20poly1305-ietf-decrypt">
<refentry xml:id="function.sodium-crypto-aead-chacha20poly1305-ietf-decrypt" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>sodium_crypto_aead_chacha20poly1305_ietf_decrypt</refname>
<refpurpose>Verify that the ciphertext includes a valid tag</refpurpose>
Expand All @@ -13,7 +13,7 @@
<methodparam><type>string</type><parameter>ciphertext</parameter></methodparam>
<methodparam><type>string</type><parameter>additional_data</parameter></methodparam>
<methodparam><type>string</type><parameter>nonce</parameter></methodparam>
<methodparam><type>string</type><parameter>key</parameter></methodparam>
<methodparam><modifier role="attribute">#[\SensitiveParameter]</modifier><type>string</type><parameter>key</parameter></methodparam>
</methodsynopsis>
<para>
Verify then decrypt with ChaCha20-Poly1305 (IETF variant).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="function.sodium-crypto-aead-chacha20poly1305-ietf-encrypt">
<refentry xml:id="function.sodium-crypto-aead-chacha20poly1305-ietf-encrypt" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>sodium_crypto_aead_chacha20poly1305_ietf_encrypt</refname>
<refpurpose>Encrypt a message</refpurpose>
Expand All @@ -10,10 +10,10 @@
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>sodium_crypto_aead_chacha20poly1305_ietf_encrypt</methodname>
<methodparam><type>string</type><parameter>message</parameter></methodparam>
<methodparam><modifier role="attribute">#[\SensitiveParameter]</modifier><type>string</type><parameter>message</parameter></methodparam>
<methodparam><type>string</type><parameter>additional_data</parameter></methodparam>
<methodparam><type>string</type><parameter>nonce</parameter></methodparam>
<methodparam><type>string</type><parameter>key</parameter></methodparam>
<methodparam><modifier role="attribute">#[\SensitiveParameter]</modifier><type>string</type><parameter>key</parameter></methodparam>
</methodsynopsis>
<para>
Encrypt then authenticate with ChaCha20-Poly1305 (IETF variant).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="function.sodium-crypto-aead-xchacha20poly1305-ietf-decrypt">
<refentry xml:id="function.sodium-crypto-aead-xchacha20poly1305-ietf-decrypt" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>sodium_crypto_aead_xchacha20poly1305_ietf_decrypt</refname>
<refpurpose>(Preferred) Verify then decrypt with XChaCha20-Poly1305</refpurpose>
Expand All @@ -13,7 +13,7 @@
<methodparam><type>string</type><parameter>ciphertext</parameter></methodparam>
<methodparam><type>string</type><parameter>additional_data</parameter></methodparam>
<methodparam><type>string</type><parameter>nonce</parameter></methodparam>
<methodparam><type>string</type><parameter>key</parameter></methodparam>
<methodparam><modifier role="attribute">#[\SensitiveParameter]</modifier><type>string</type><parameter>key</parameter></methodparam>
</methodsynopsis>
<para>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="function.sodium-crypto-aead-xchacha20poly1305-ietf-encrypt">
<refentry xml:id="function.sodium-crypto-aead-xchacha20poly1305-ietf-encrypt" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>sodium_crypto_aead_xchacha20poly1305_ietf_encrypt</refname>
<refpurpose>(Preferred) Encrypt then authenticate with XChaCha20-Poly1305</refpurpose>
Expand All @@ -10,10 +10,10 @@
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>sodium_crypto_aead_xchacha20poly1305_ietf_encrypt</methodname>
<methodparam><type>string</type><parameter>message</parameter></methodparam>
<methodparam><modifier role="attribute">#[\SensitiveParameter]</modifier><type>string</type><parameter>message</parameter></methodparam>
<methodparam><type>string</type><parameter>additional_data</parameter></methodparam>
<methodparam><type>string</type><parameter>nonce</parameter></methodparam>
<methodparam><type>string</type><parameter>key</parameter></methodparam>
<methodparam><modifier role="attribute">#[\SensitiveParameter]</modifier><type>string</type><parameter>key</parameter></methodparam>
</methodsynopsis>
<para>
Encrypt then authenticate with XChaCha20-Poly1305 (eXtended-nonce variant).
Expand Down
2 changes: 1 addition & 1 deletion reference/sodium/functions/sodium-crypto-auth-verify.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<type>bool</type><methodname>sodium_crypto_auth_verify</methodname>
<methodparam><type>string</type><parameter>mac</parameter></methodparam>
<methodparam><type>string</type><parameter>message</parameter></methodparam>
<methodparam><type>string</type><parameter>key</parameter></methodparam>
<methodparam><modifier role="attribute">#[\SensitiveParameter]</modifier><type>string</type><parameter>key</parameter></methodparam>
</methodsynopsis>
<para>
Verify the authentication tag is valid for a given message and key.
Expand Down
2 changes: 1 addition & 1 deletion reference/sodium/functions/sodium-crypto-auth.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<methodsynopsis>
<type>string</type><methodname>sodium_crypto_auth</methodname>
<methodparam><type>string</type><parameter>message</parameter></methodparam>
<methodparam><type>string</type><parameter>key</parameter></methodparam>
<methodparam><modifier role="attribute">#[\SensitiveParameter]</modifier><type>string</type><parameter>key</parameter></methodparam>
</methodsynopsis>
<para>
Symmetric message authentication via <function>sodium_crypto_auth</function> provides
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->

<refentry xml:id="function.sodium-crypto-box-keypair-from-secretkey-and-publickey" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>sodium_crypto_box_keypair_from_secretkey_and_publickey</refname>
Expand All @@ -11,7 +10,7 @@
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>sodium_crypto_box_keypair_from_secretkey_and_publickey</methodname>
<methodparam><type>string</type><parameter>secret_key</parameter></methodparam>
<methodparam><modifier role="attribute">#[\SensitiveParameter]</modifier><type>string</type><parameter>secret_key</parameter></methodparam>
<methodparam><type>string</type><parameter>public_key</parameter></methodparam>
</methodsynopsis>
<para>
Expand Down Expand Up @@ -53,7 +52,6 @@


</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
Expand Down
2 changes: 1 addition & 1 deletion reference/sodium/functions/sodium-crypto-box-open.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<type class="union"><type>string</type><type>false</type></type><methodname>sodium_crypto_box_open</methodname>
<methodparam><type>string</type><parameter>ciphertext</parameter></methodparam>
<methodparam><type>string</type><parameter>nonce</parameter></methodparam>
<methodparam><type>string</type><parameter>key_pair</parameter></methodparam>
<methodparam><modifier role="attribute">#[\SensitiveParameter]</modifier><type>string</type><parameter>key_pair</parameter></methodparam>
</methodsynopsis>
<para>
Decrypt a message using asymmetric (public key) cryptography.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>sodium_crypto_box_publickey_from_secretkey</methodname>
<methodparam><type>string</type><parameter>secret_key</parameter></methodparam>
<methodparam><modifier role="attribute">#[\SensitiveParameter]</modifier><type>string</type><parameter>secret_key</parameter></methodparam>
</methodsynopsis>
<para>
Given a secret key, calculate the corresponding public key.
Expand Down
2 changes: 1 addition & 1 deletion reference/sodium/functions/sodium-crypto-box-publickey.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>sodium_crypto_box_publickey</methodname>
<methodparam><type>string</type><parameter>key_pair</parameter></methodparam>
<methodparam><modifier role="attribute">#[\SensitiveParameter]</modifier><type>string</type><parameter>key_pair</parameter></methodparam>
</methodsynopsis>
<para>
Given a keypair, fetch only the public key.
Expand Down
2 changes: 1 addition & 1 deletion reference/sodium/functions/sodium-crypto-box-seal-open.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<methodsynopsis>
<type class="union"><type>string</type><type>false</type></type><methodname>sodium_crypto_box_seal_open</methodname>
<methodparam><type>string</type><parameter>ciphertext</parameter></methodparam>
<methodparam><type>string</type><parameter>key_pair</parameter></methodparam>
<methodparam><modifier role="attribute">#[\SensitiveParameter]</modifier><type>string</type><parameter>key_pair</parameter></methodparam>
</methodsynopsis>
<para>
Decrypt a message that was encrypted with <function>sodium_crypto_box_seal</function>
Expand Down
2 changes: 1 addition & 1 deletion reference/sodium/functions/sodium-crypto-box-seal.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>sodium_crypto_box_seal</methodname>
<methodparam><type>string</type><parameter>message</parameter></methodparam>
<methodparam><modifier role="attribute">#[\SensitiveParameter]</modifier><type>string</type><parameter>message</parameter></methodparam>
<methodparam><type>string</type><parameter>public_key</parameter></methodparam>
</methodsynopsis>
<para>
Expand Down
2 changes: 1 addition & 1 deletion reference/sodium/functions/sodium-crypto-box-secretkey.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>sodium_crypto_box_secretkey</methodname>
<methodparam><type>string</type><parameter>key_pair</parameter></methodparam>
<methodparam><modifier role="attribute">#[\SensitiveParameter]</modifier><type>string</type><parameter>key_pair</parameter></methodparam>
</methodsynopsis>
<para>
Given a keypair, fetch only the secret key.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>sodium_crypto_box_seed_keypair</methodname>
<methodparam><type>string</type><parameter>seed</parameter></methodparam>
<methodparam><modifier role="attribute">#[\SensitiveParameter]</modifier><type>string</type><parameter>seed</parameter></methodparam>
</methodsynopsis>
<para>
Clamps the seed to form a secret key, derives the public key, and returns the two as a keypair.
Expand Down
Loading

0 comments on commit d76a7fe

Please sign in to comment.