ParagonIE_Sodium_Compat::crypto_secretstream_xchacha20poly1305_init_pull

Advertisement

Syntax Syntax

ParagonIE_Sodium_Compat::crypto_secretstream_xchacha20poly1305_init_pull( string $header, string $key )

Parameters Parameters

$header

(string) (Required)

$key

(string) (Required)

Return Return

(string) Returns a state.

Source Source

File: wp-includes/sodium_compat/src/Compat.php

    public static function crypto_secretstream_xchacha20poly1305_init_pull($header, $key)
    {
        if (ParagonIE_Sodium_Core_Util::strlen($header) < self::CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_HEADERBYTES) {
            throw new SodiumException(
                'header size should be SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_HEADERBYTES bytes'
            );
        }
        if (PHP_INT_SIZE === 4) {
            return ParagonIE_Sodium_Crypto32::secretstream_xchacha20poly1305_init_pull($key, $header);
        }
        return ParagonIE_Sodium_Crypto::secretstream_xchacha20poly1305_init_pull($key, $header);
    }

Advertisement

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.