ParagonIE_Sodium_Core32_XSalsa20::xsalsa20

Advertisement

Summery Summery

Expand a key and nonce into an xsalsa20 keystream.

Syntax Syntax

ParagonIE_Sodium_Core32_XSalsa20::xsalsa20( int $len, string $nonce, string $key )

Parameters Parameters

$len

(int) (Required)

$nonce

(string) (Required)

$key

(string) (Required)

Return Return

(string)

Source Source

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

    public static function xsalsa20($len, $nonce, $key)
    {
        $ret = self::salsa20(
            $len,
            self::substr($nonce, 16, 8),
            self::hsalsa20($nonce, $key)
        );
        return $ret;
    }

Advertisement

Advertisement

Leave a Reply

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