PHP.nl

sodium_crypto_secretstream_xchacha20poly1305_push

sodium_crypto_secretstream_xchacha20poly1305_push

Encrypt a chunk of data so that it can safely be decrypted in a streaming API

string **sodium_crypto_secretstream_xchacha20poly1305_push** string $state string $message string $additional_data int $tag

Encrypt a chunk of data so that it can safely be decrypted in a streaming API.

state See and sodium_crypto_secretstream_xchacha20poly1305_init_pull``sodium_crypto_secretstream_xchacha20poly1305_init_push

message

additional_data

tagOptional. Can be used to assert decryption behavior (i.e. re-keying or indicating the final chunk in a stream).

SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_MESSAGE``SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_FINAL``SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_PUSH``SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_REKEYReturns the encrypted ciphertext.