PHP 7 >= 7.2.0, PHP 8
sodium_crypto_secretstream_xchacha20poly1305_init_push - Initialize a secretstream context for encryption
Code Examples

sodium_crypto_secretstream_xchacha20poly1305_init_push( string$key ): array

Initialize a secretstream context for encryption.



Cryptography key. See sodium_crypto_secretstream_xchacha20poly1305_keygen.

Return Values

An array with two string values:

The secretstream state, needed for further pushes The secretstream header, which needs to be provided to the recipient so they can pull data

Example of sodium_crypto_secretstream_xchacha20poly1305_init_push

Show all examples for sodium_crypto_secretstream_xchacha20poly1305_init_push

PHP Version:

Function sodium_crypto_secretstream_xchacha20poly1305_init_push:

Sodium Functions

Most used PHP functions