ParagonIE_Sodium_Core32_ChaCha20::stream

Advertisement

Syntax Syntax

ParagonIE_Sodium_Core32_ChaCha20::stream( int $len = 64, string $nonce = '', string $key = '' )

Parameters Parameters

$len

(int) (Optional)

Default value: 64

$nonce

(string) (Optional)

Default value: ''

$key

(string) (Optional)

Default value: ''

Return Return

(string)

Source Source

File: wp-includes/sodium_compat/src/Core32/ChaCha20.php

    public static function stream($len = 64, $nonce = '', $key = '')
    {
        return self::encryptBytes(
            new ParagonIE_Sodium_Core32_ChaCha20_Ctx($key, $nonce),
            str_repeat("\x00", $len)
        );
    }

Advertisement

Advertisement

Leave a Reply

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