Class ParagonIE_Sodium_Crypto

ATTENTION!

If you are using this library, you should be using ParagonIE_Sodium_Compat in your code, not this class.

package WordPress
inherited_from \ParagonIE_Sodium_Crypto

 Methods

box_seed_keypair()

box_seed_keypair(string $seed) : string
InheritedStatic

Parameters

$seed

string

Exceptions

\SodiumException
\TypeError

Returns

string

ECDH over Curve25519, using the basepoint.

scalarmult_base(string $secret) : string
InheritedStatic

Used to get a secret key from a public key.

Parameters

$secret

string

Exceptions

\SodiumException
\TypeError

Returns

string

This throws an Error if a zero public key was passed to the function.

scalarmult_throw_if_zero(string $q) : void
InheritedStatic

Parameters

$q

string

Exceptions

\SodiumException
\TypeError

 Constants

 

aead_chacha20poly1305_ABYTES

aead_chacha20poly1305_ABYTES = 16 
 

aead_chacha20poly1305_IETF_ABYTES

aead_chacha20poly1305_IETF_ABYTES = 16 
 

aead_chacha20poly1305_IETF_KEYBYTES

aead_chacha20poly1305_IETF_KEYBYTES = 32 
 

aead_chacha20poly1305_IETF_NPUBBYTES

aead_chacha20poly1305_IETF_NPUBBYTES = 12 
 

aead_chacha20poly1305_IETF_NSECBYTES

aead_chacha20poly1305_IETF_NSECBYTES = 0 
 

aead_chacha20poly1305_KEYBYTES

aead_chacha20poly1305_KEYBYTES = 32 
 

aead_chacha20poly1305_NPUBBYTES

aead_chacha20poly1305_NPUBBYTES = 8 
 

aead_chacha20poly1305_NSECBYTES

aead_chacha20poly1305_NSECBYTES = 0 
 

aead_xchacha20poly1305_IETF_ABYTES

aead_xchacha20poly1305_IETF_ABYTES = 16 
 

aead_xchacha20poly1305_IETF_KEYBYTES

aead_xchacha20poly1305_IETF_KEYBYTES = 32 
 

aead_xchacha20poly1305_IETF_NPUBBYTES

aead_xchacha20poly1305_IETF_NPUBBYTES = 24 
 

aead_xchacha20poly1305_IETF_NSECBYTES

aead_xchacha20poly1305_IETF_NSECBYTES = 0 
 

box_curve25519xsalsa20poly1305_BEFORENMBYTES

box_curve25519xsalsa20poly1305_BEFORENMBYTES = 32 
 

box_curve25519xsalsa20poly1305_BOXZEROBYTES

box_curve25519xsalsa20poly1305_BOXZEROBYTES = 16 
 

box_curve25519xsalsa20poly1305_MACBYTES

box_curve25519xsalsa20poly1305_MACBYTES = 16 
 

box_curve25519xsalsa20poly1305_NONCEBYTES

box_curve25519xsalsa20poly1305_NONCEBYTES = 24 
 

box_curve25519xsalsa20poly1305_PUBLICKEYBYTES

box_curve25519xsalsa20poly1305_PUBLICKEYBYTES = 32 
 

box_curve25519xsalsa20poly1305_SECRETKEYBYTES

box_curve25519xsalsa20poly1305_SECRETKEYBYTES = 32 
 

box_curve25519xsalsa20poly1305_SEEDBYTES

box_curve25519xsalsa20poly1305_SEEDBYTES = 32 
 

box_curve25519xsalsa20poly1305_ZEROBYTES

box_curve25519xsalsa20poly1305_ZEROBYTES = 32 
 

onetimeauth_poly1305_BYTES

onetimeauth_poly1305_BYTES = 16 
 

onetimeauth_poly1305_KEYBYTES

onetimeauth_poly1305_KEYBYTES = 32 
 

secretbox_xchacha20poly1305_BOXZEROBYTES

secretbox_xchacha20poly1305_BOXZEROBYTES = 16 
 

secretbox_xchacha20poly1305_KEYBYTES

secretbox_xchacha20poly1305_KEYBYTES = 32 
 

secretbox_xchacha20poly1305_MACBYTES

secretbox_xchacha20poly1305_MACBYTES = 16 
 

secretbox_xchacha20poly1305_NONCEBYTES

secretbox_xchacha20poly1305_NONCEBYTES = 24 
 

secretbox_xchacha20poly1305_ZEROBYTES

secretbox_xchacha20poly1305_ZEROBYTES = 32 
 

secretbox_xsalsa20poly1305_BOXZEROBYTES

secretbox_xsalsa20poly1305_BOXZEROBYTES = 16 
 

secretbox_xsalsa20poly1305_KEYBYTES

secretbox_xsalsa20poly1305_KEYBYTES = 32 
 

secretbox_xsalsa20poly1305_MACBYTES

secretbox_xsalsa20poly1305_MACBYTES = 16 
 

secretbox_xsalsa20poly1305_NONCEBYTES

secretbox_xsalsa20poly1305_NONCEBYTES = 24 
 

secretbox_xsalsa20poly1305_ZEROBYTES

secretbox_xsalsa20poly1305_ZEROBYTES = 32 
 

stream_salsa20_KEYBYTES

stream_salsa20_KEYBYTES = 32