sodium_crypto_secretstream_xchacha20poly1305_pull
Function • Params and return types changed in PHP 8.0
Decrypt a chunk of data from an encrypted stream.
sodium_crypto_secretstream_xchacha20poly1305_pull Function synopsis
sodium_crypto_secretstream_xchacha20poly1305_pull(
string &$state,
string $ciphertext,
string $additional_data = ""
): array|false
Parameters
$state
Passed by referenceTypestring
See sodium_crypto_secretstream_xchacha20poly1305_init_pull
and sodium_crypto_secretstream_xchacha20poly1305_init_push
$ciphertext
Typestring
The ciphertext chunk to decrypt.
$additional_data
OptionalTypestringDefault value""
Optional additional data to include in the authentication tag.
Note that the parameter
$stateis passed by reference, and contains additional/updated context data that may be useful.
Return value
Typearray|false
An array with two values:
`string`; The decrypted chunk
`int`; An optional tag (if provided during push). Possible values: Changes to the sodium_crypto_secretstream_xchacha20poly1305_pull Function
PHP 8.0
- Return type added:
array|false - Parameter type added for parameter #1 (
$state):string - Parameter name of parameter #2 changed:
$stringto$ciphertext - Parameter type added for parameter #2 (
$ciphertext):string - Parameter name of parameter #3 changed:
$stringto$additional_data - Parameter type added for parameter #3 (
$additional_data):string - Parameter default value added for position #3 (
$additional_data):""
sodium_crypto_secretstream_xchacha20poly1305_pull(
- &$state,
+ string &$state,
- $string,
+ string $ciphertext,
- $string
+ string $additional_data = ""
- )
+ ): array|false PHP 7.2
- Function added
sodium_crypto_secretstream_xchacha20poly1305_pull Function Availability
sodium_crypto_secretstream_xchacha20poly1305_pull Function Availability| PHP Version | Availability |
|---|---|
| PHP 8.6Future Release | Yes |
| PHP 8.5Upcoming Release | Yes |
| PHP 8.4Supported (Latest) | Yes |
| PHP 8.3Supported | Yes |
| PHP 8.2Security-Fixes Only | Yes |
| PHP 8.1Security-Fixes Only | Yes |
| PHP 8.0Unsupported | Yes |
| PHP 7.4Unsupported | Yes |
| PHP 7.3Unsupported | Yes |
| PHP 7.2Unsupported | Yes |
| PHP 7.1Unsupported | No |
| PHP 7.0Unsupported | No |
| PHP 5.6Unsupported | No |
| PHP 5.5Unsupported | No |
| PHP 5.4Unsupported | No |
| PHP 5.3Unsupported | No |