ParagonIE_Sodium_Crypto32::box

Advertisement

Summery Summery

X25519 key exchange followed by XSalsa20Poly1305 symmetric encryption

Syntax Syntax

ParagonIE_Sodium_Crypto32::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/Crypto32.php

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

Advertisement

Advertisement

Leave a Reply