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

(Required)

$pk

(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