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

(string) (Required)

$nonce

(string) (Required)

$keypair

(string) (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

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