Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<sodium_crypto_secretstream_xchacha20poly1305_keygensodium_crypto_secretstream_xchacha20poly1305_push>
^Sodium FunctionsLast updated: Mon, 26 Oct 2026

sodium_crypto_secretstream_xchacha20poly1305_pull

(PHP 7 >= 7.2.0, PHP 8)

sodium_crypto_secretstream_xchacha20poly1305_pull — Decrypt a chunk of data from an encrypted stream

Description

function sodium_crypto_secretstream_xchacha20poly1305_pull(string &$state, string $ciphertext, string $additional_data = ""): array|false

Decrypt a chunk of data from an encrypted stream.

Parameters

state

See sodium_crypto_secretstream_xchacha20poly1305_init_pull() and sodium_crypto_secretstream_xchacha20poly1305_init_push()

ciphertext

The ciphertext chunk to decrypt.

additional_data

Optional additional data to include in the authentication tag.

Return Values

An array with two values:


<sodium_crypto_secretstream_xchacha20poly1305_keygensodium_crypto_secretstream_xchacha20poly1305_push>
^Sodium FunctionsLast updated: Mon, 26 Oct 2026