Summery Summery
X25519 key exchange followed by XSalsa20Poly1305 symmetric encryption
Syntax Syntax
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) ) ); }