ParagonIE_Sodium_Crypto::box_beforenm

Advertisement

Summery Summery

Used by crypto_box() to get the crypto_secretbox() key.

Syntax Syntax

ParagonIE_Sodium_Crypto::box_beforenm( string $sk, string $pk )

Parameters Parameters

$sk

(string) (Required)

$pk

(string) (Required)

Return Return

(string)

Source Source

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

    public static function box_beforenm($sk, $pk)
    {
        return ParagonIE_Sodium_Core_HSalsa20::hsalsa20(
            str_repeat("\x00", 16),
            self::scalarmult($sk, $pk)
        );
    }

Advertisement

Advertisement

Leave a Reply

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