WordPress at a glance
function is not described

ParagonIE_Sodium_Crypto::secretstream_xchacha20poly1305_init_pull() public WP 1.0

{} It's a method of the class: ParagonIE_Sodium_Crypto{}

No Hooks.

Return

String. Returns a state.

Usage

$result = ParagonIE_Sodium_Crypto::secretstream_xchacha20poly1305_init_pull( $key, $header );
$key(string) (required)
-
$header(string) (required)
-

Code of ParagonIE_Sodium_Crypto::secretstream_xchacha20poly1305_init_pull() WP 5.7

<?php
public static function secretstream_xchacha20poly1305_init_pull($key, $header)
{
    # crypto_core_hchacha20(state->k, in, k, NULL);
    $subkey = ParagonIE_Sodium_Core_HChaCha20::hChaCha20(
        ParagonIE_Sodium_Core_Util::substr($header, 0, 16),
        $key
    );
    $state = new ParagonIE_Sodium_Core_SecretStream_State(
        $subkey,
        ParagonIE_Sodium_Core_Util::substr($header, 16)
    );
    $state->counterReset();
    # memcpy(STATE_INONCE(state), in + crypto_core_hchacha20_INPUTBYTES,
    #     crypto_secretstream_xchacha20poly1305_INONCEBYTES);
    # memset(state->_pad, 0, sizeof state->_pad);
    # return 0;
    return $state->toString();
}