ParagonIE_Sodium_Crypto::box

Advertisement

Summery Summery

X25519 key exchange followed by XSalsa20Poly1305 symmetric encryption

Syntax Syntax

ParagonIE_Sodium_Crypto::box( string $plaintext, string $nonce, string $keypair )

Parameters Parameters

$plaintext

(Required)

$nonce

(Required)

$keypair

(Required)

Return Return

(string)

Source Source

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

    public static function box($plaintext, $nonce, $keypair)
    {
        $c = self::secretbox(
            $plaintext,
            $nonce,
            self::box_beforenm(
                self::box_secretkey($keypair),
                self::box_publickey($keypair)
            )
        );
        return $c;
    }

Advertisement

Advertisement

Leave a Reply