ParagonIE_Sodium_Crypto

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

Default

Methods

box_seed_keypair

box_seed_keypair(string $seed): string
static
Throws
\SodiumException
\TypeError

Arguments

$seed

string

Response

string

ECDH over Curve25519, using the basepoint.

scalarmult_base(string $secret): string
static

Used to get a secret key from a public key.

Throws
\SodiumException
\TypeError

Arguments

$secret

string

Response

string

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

scalarmult_throw_if_zero(string $q): void
static
Throws
\SodiumException
\TypeError

Arguments

$q

string

secretstream_xchacha20poly1305_init_pull

secretstream_xchacha20poly1305_init_pull(string $key,string $header): string
static
Throws
\Exception

Arguments

$key

string

$header

string

Response

string

Returns a state.

secretstream_xchacha20poly1305_init_push

secretstream_xchacha20poly1305_init_push(string $key): \array<int,
static
Throws
\Exception
\SodiumException

Arguments

$key

string

Response

\array

string> Returns a state and a header.

secretstream_xchacha20poly1305_pull

secretstream_xchacha20poly1305_pull(string &$state,string $cipher,string $aad = ''): boolean|\array{0:
static
Throws
\SodiumException

Arguments

$state

string

$cipher

string

$aad

string

Response

boolean|\array{0:

string, 1: int}

secretstream_xchacha20poly1305_push

secretstream_xchacha20poly1305_push(string &$state,string $msg,string $aad = '',integer $tag): string
static
Throws
\SodiumException

Arguments

$state

string

$msg

string

$aad

string

$tag

integer

Response

string

secretstream_xchacha20poly1305_rekey

secretstream_xchacha20poly1305_rekey(string &$state): void
static
Throws
\SodiumException

Arguments

$state

string

Constants

aead_chacha20poly1305_KEYBYTES

aead_chacha20poly1305_KEYBYTES

aead_chacha20poly1305_NSECBYTES

aead_chacha20poly1305_NSECBYTES

aead_chacha20poly1305_NPUBBYTES

aead_chacha20poly1305_NPUBBYTES

aead_chacha20poly1305_ABYTES

aead_chacha20poly1305_ABYTES

aead_chacha20poly1305_IETF_KEYBYTES

aead_chacha20poly1305_IETF_KEYBYTES

aead_chacha20poly1305_IETF_NSECBYTES

aead_chacha20poly1305_IETF_NSECBYTES

aead_chacha20poly1305_IETF_NPUBBYTES

aead_chacha20poly1305_IETF_NPUBBYTES

aead_chacha20poly1305_IETF_ABYTES

aead_chacha20poly1305_IETF_ABYTES

aead_xchacha20poly1305_IETF_KEYBYTES

aead_xchacha20poly1305_IETF_KEYBYTES

aead_xchacha20poly1305_IETF_NSECBYTES

aead_xchacha20poly1305_IETF_NSECBYTES

aead_xchacha20poly1305_IETF_NPUBBYTES

aead_xchacha20poly1305_IETF_NPUBBYTES

aead_xchacha20poly1305_IETF_ABYTES

aead_xchacha20poly1305_IETF_ABYTES

box_curve25519xsalsa20poly1305_SEEDBYTES

box_curve25519xsalsa20poly1305_SEEDBYTES

box_curve25519xsalsa20poly1305_PUBLICKEYBYTES

box_curve25519xsalsa20poly1305_PUBLICKEYBYTES

box_curve25519xsalsa20poly1305_SECRETKEYBYTES

box_curve25519xsalsa20poly1305_SECRETKEYBYTES

box_curve25519xsalsa20poly1305_BEFORENMBYTES

box_curve25519xsalsa20poly1305_BEFORENMBYTES

box_curve25519xsalsa20poly1305_NONCEBYTES

box_curve25519xsalsa20poly1305_NONCEBYTES

box_curve25519xsalsa20poly1305_MACBYTES

box_curve25519xsalsa20poly1305_MACBYTES

box_curve25519xsalsa20poly1305_BOXZEROBYTES

box_curve25519xsalsa20poly1305_BOXZEROBYTES

box_curve25519xsalsa20poly1305_ZEROBYTES

box_curve25519xsalsa20poly1305_ZEROBYTES

onetimeauth_poly1305_BYTES

onetimeauth_poly1305_BYTES

onetimeauth_poly1305_KEYBYTES

onetimeauth_poly1305_KEYBYTES

secretbox_xsalsa20poly1305_KEYBYTES

secretbox_xsalsa20poly1305_KEYBYTES

secretbox_xsalsa20poly1305_NONCEBYTES

secretbox_xsalsa20poly1305_NONCEBYTES

secretbox_xsalsa20poly1305_MACBYTES

secretbox_xsalsa20poly1305_MACBYTES

secretbox_xsalsa20poly1305_BOXZEROBYTES

secretbox_xsalsa20poly1305_BOXZEROBYTES

secretbox_xsalsa20poly1305_ZEROBYTES

secretbox_xsalsa20poly1305_ZEROBYTES

secretbox_xchacha20poly1305_KEYBYTES

secretbox_xchacha20poly1305_KEYBYTES

secretbox_xchacha20poly1305_NONCEBYTES

secretbox_xchacha20poly1305_NONCEBYTES

secretbox_xchacha20poly1305_MACBYTES

secretbox_xchacha20poly1305_MACBYTES

secretbox_xchacha20poly1305_BOXZEROBYTES

secretbox_xchacha20poly1305_BOXZEROBYTES

secretbox_xchacha20poly1305_ZEROBYTES

secretbox_xchacha20poly1305_ZEROBYTES

stream_salsa20_KEYBYTES

stream_salsa20_KEYBYTES