Functions

bin2hex()

bin2hex(string $string) : string
package WordPress
see

Parameters

$string

string

Exceptions

\SodiumException
\TypeError

Returns

string

compare()

compare(string $a, string $b) : integer
package WordPress
see

Parameters

$a

string

$b

string

Exceptions

\SodiumException
\TypeError

Returns

integer

crypto_aead_aes256gcm_decrypt()

crypto_aead_aes256gcm_decrypt(string $message, string $assocData, string $nonce, string $key) : string | boolean
package WordPress
see

Parameters

$message

string

$assocData

string

$nonce

string

$key

string

Returns

stringboolean

crypto_aead_aes256gcm_encrypt()

crypto_aead_aes256gcm_encrypt(string $message, string $assocData, string $nonce, string $key) : string
package WordPress
see

Parameters

$message

string

$assocData

string

$nonce

string

$key

string

Exceptions

\SodiumException
\TypeError

Returns

string

crypto_aead_aes256gcm_is_available()

crypto_aead_aes256gcm_is_available() : boolean
package WordPress
see

Returns

boolean

crypto_aead_chacha20poly1305_decrypt()

crypto_aead_chacha20poly1305_decrypt(string $message, string $assocData, string $nonce, string $key) : string | boolean
package WordPress
see

Parameters

$message

string

$assocData

string

$nonce

string

$key

string

Returns

stringboolean

crypto_aead_chacha20poly1305_encrypt()

crypto_aead_chacha20poly1305_encrypt(string $message, string $assocData, string $nonce, string $key) : string
package WordPress
see

Parameters

$message

string

$assocData

string

$nonce

string

$key

string

Exceptions

\SodiumException
\TypeError

Returns

string

crypto_aead_chacha20poly1305_ietf_decrypt()

crypto_aead_chacha20poly1305_ietf_decrypt(string $message, string $assocData, string $nonce, string $key) : string | boolean
package WordPress
see

Parameters

$message

string

$assocData

string

$nonce

string

$key

string

Returns

stringboolean

crypto_aead_chacha20poly1305_ietf_encrypt()

crypto_aead_chacha20poly1305_ietf_encrypt(string $message, string $assocData, string $nonce, string $key) : string
package WordPress
see

Parameters

$message

string

$assocData

string

$nonce

string

$key

string

Exceptions

\SodiumException
\TypeError

Returns

string

crypto_auth()

crypto_auth(string $message, string $key) : string
package WordPress
see

Parameters

$message

string

$key

string

Exceptions

\SodiumException
\TypeError

Returns

string

crypto_auth_verify()

crypto_auth_verify(string $mac, string $message, string $key) : boolean
package WordPress
see

Parameters

$mac

string

$message

string

$key

string

Exceptions

\SodiumException
\TypeError

Returns

boolean

crypto_box()

crypto_box(string $message, string $nonce, string $kp) : string
package WordPress
see

Parameters

$message

string

$nonce

string

$kp

string

Exceptions

\SodiumException
\TypeError

Returns

string

crypto_box_keypair()

crypto_box_keypair() : string
package WordPress
see

Exceptions

\SodiumException
\TypeError

Returns

string

crypto_box_keypair_from_secretkey_and_publickey()

crypto_box_keypair_from_secretkey_and_publickey(string $sk, string $pk) : string
package WordPress
see

Parameters

$sk

string

$pk

string

Exceptions

\SodiumException
\TypeError

Returns

string

crypto_box_open()

crypto_box_open(string $message, string $nonce, string $kp) : string | boolean
package WordPress
see

Parameters

$message

string

$nonce

string

$kp

string

Returns

stringboolean

crypto_box_publickey()

crypto_box_publickey(string $keypair) : string
package WordPress
see

Parameters

$keypair

string

Exceptions

\SodiumException
\TypeError

Returns

string

crypto_box_publickey_from_secretkey()

crypto_box_publickey_from_secretkey(string $sk) : string
package WordPress
see

Parameters

$sk

string

Exceptions

\SodiumException
\TypeError

Returns

string

crypto_box_seal()

crypto_box_seal(string $message, string $publicKey) : string
package WordPress
see

Parameters

$message

string

$publicKey

string

Exceptions

\SodiumException
\TypeError

Returns

string

crypto_box_seal_open()

crypto_box_seal_open(string $message, string $kp) : string | boolean
package WordPress
see

Parameters

$message

string

$kp

string

Returns

stringboolean

crypto_box_secretkey()

crypto_box_secretkey(string $keypair) : string
package WordPress
see

Parameters

$keypair

string

Exceptions

\SodiumException
\TypeError

Returns

string

crypto_generichash()

crypto_generichash(string $message, string|null $key = null, integer $outLen = 32) : string
package WordPress
see

Parameters

$message

string

$key

stringnull

$outLen

integer

Exceptions

\SodiumException
\TypeError

Returns

string

crypto_generichash_final()

crypto_generichash_final(string|null $ctx, integer $outputLength = 32) : string
package WordPress
see

Parameters

$ctx

stringnull

$outputLength

integer

Exceptions

\SodiumException
\TypeError

Returns

string

crypto_generichash_init()

crypto_generichash_init(string|null $key = null, integer $outLen = 32) : string
package WordPress
see

Parameters

$key

stringnull

$outLen

integer

Exceptions

\SodiumException
\TypeError

Returns

string

crypto_generichash_update()

crypto_generichash_update(string|null $ctx, string $message = '') : void
package WordPress
see

Parameters

$ctx

stringnull

$message

string

Exceptions

\SodiumException
\TypeError

crypto_kx()

crypto_kx(string $my_secret, string $their_public, string $client_public, string $server_public) : string
package WordPress
see

Parameters

$my_secret

string

$their_public

string

$client_public

string

$server_public

string

Exceptions

\SodiumException
\TypeError

Returns

string

crypto_pwhash()

crypto_pwhash(integer $outlen, string $passwd, string $salt, integer $opslimit, integer $memlimit) : string
package WordPress
see

Parameters

$outlen

integer

$passwd

string

$salt

string

$opslimit

integer

$memlimit

integer

Exceptions

\SodiumException
\TypeError

Returns

string

crypto_pwhash_scryptsalsa208sha256()

crypto_pwhash_scryptsalsa208sha256(integer $outlen, string $passwd, string $salt, integer $opslimit, integer $memlimit) : string
package WordPress
see

Parameters

$outlen

integer

$passwd

string

$salt

string

$opslimit

integer

$memlimit

integer

Exceptions

\SodiumException
\TypeError

Returns

string

crypto_pwhash_scryptsalsa208sha256_str()

crypto_pwhash_scryptsalsa208sha256_str(string $passwd, integer $opslimit, integer $memlimit) : string
package WordPress
see

Parameters

$passwd

string

$opslimit

integer

$memlimit

integer

Exceptions

\SodiumException
\TypeError

Returns

string

crypto_pwhash_scryptsalsa208sha256_str_verify()

crypto_pwhash_scryptsalsa208sha256_str_verify(string $passwd, string $hash) : boolean
package WordPress
see

Parameters

$passwd

string

$hash

string

Exceptions

\SodiumException
\TypeError

Returns

boolean

crypto_pwhash_str()

crypto_pwhash_str(string $passwd, integer $opslimit, integer $memlimit) : string
package WordPress
see

Parameters

$passwd

string

$opslimit

integer

$memlimit

integer

Exceptions

\SodiumException
\TypeError

Returns

string

crypto_pwhash_str_verify()

crypto_pwhash_str_verify(string $passwd, string $hash) : boolean
package WordPress
see

Parameters

$passwd

string

$hash

string

Exceptions

\SodiumException
\TypeError

Returns

boolean

crypto_scalarmult()

crypto_scalarmult(string $n, string $p) : string
package WordPress
see

Parameters

$n

string

$p

string

Exceptions

\SodiumException
\TypeError

Returns

string

crypto_scalarmult_base()

crypto_scalarmult_base(string $n) : string
package WordPress
see

Parameters

$n

string

Exceptions

\SodiumException
\TypeError

Returns

string

crypto_secretbox()

crypto_secretbox(string $message, string $nonce, string $key) : string
package WordPress
see

Parameters

$message

string

$nonce

string

$key

string

Exceptions

\SodiumException
\TypeError

Returns

string

crypto_secretbox_open()

crypto_secretbox_open(string $message, string $nonce, string $key) : string | boolean
package WordPress
see

Parameters

$message

string

$nonce

string

$key

string

Returns

stringboolean

crypto_shorthash()

crypto_shorthash(string $message, string $key = '') : string
package WordPress
see

Parameters

$message

string

$key

string

Exceptions

\SodiumException
\TypeError

Returns

string

crypto_sign()

crypto_sign(string $message, string $sk) : string
package WordPress
see

Parameters

$message

string

$sk

string

Exceptions

\SodiumException
\TypeError

Returns

string

crypto_sign_detached()

crypto_sign_detached(string $message, string $sk) : string
package WordPress
see

Parameters

$message

string

$sk

string

Exceptions

\SodiumException
\TypeError

Returns

string

crypto_sign_ed25519_pk_to_curve25519()

crypto_sign_ed25519_pk_to_curve25519(string $pk) : string
package WordPress
see

Parameters

$pk

string

Exceptions

\SodiumException
\TypeError

Returns

string

crypto_sign_ed25519_sk_to_curve25519()

crypto_sign_ed25519_sk_to_curve25519(string $sk) : string
package WordPress
see

Parameters

$sk

string

Exceptions

\SodiumException
\TypeError

Returns

string

crypto_sign_keypair()

crypto_sign_keypair() : string
package WordPress
see

Exceptions

\SodiumException
\TypeError

Returns

string

crypto_sign_open()

crypto_sign_open(string $signedMessage, string $pk) : string | boolean
package WordPress
see

Parameters

$signedMessage

string

$pk

string

Returns

stringboolean

crypto_sign_publickey()

crypto_sign_publickey(string $keypair) : string
package WordPress
see

Parameters

$keypair

string

Exceptions

\SodiumException
\TypeError

Returns

string

crypto_sign_publickey_from_secretkey()

crypto_sign_publickey_from_secretkey(string $sk) : string
package WordPress
see

Parameters

$sk

string

Exceptions

\SodiumException
\TypeError

Returns

string

crypto_sign_secretkey()

crypto_sign_secretkey(string $keypair) : string
package WordPress
see

Parameters

$keypair

string

Exceptions

\SodiumException
\TypeError

Returns

string

crypto_sign_seed_keypair()

crypto_sign_seed_keypair(string $seed) : string
package WordPress
see

Parameters

$seed

string

Exceptions

\SodiumException
\TypeError

Returns

string

crypto_sign_verify_detached()

crypto_sign_verify_detached(string $signature, string $message, string $pk) : boolean
package WordPress
see

Parameters

$signature

string

$message

string

$pk

string

Exceptions

\SodiumException
\TypeError

Returns

boolean

crypto_stream()

crypto_stream(integer $len, string $nonce, string $key) : string
package WordPress
see

Parameters

$len

integer

$nonce

string

$key

string

Exceptions

\SodiumException
\TypeError

Returns

string

crypto_stream_xor()

crypto_stream_xor(string $message, string $nonce, string $key) : string
package WordPress
see

Parameters

$message

string

$nonce

string

$key

string

Exceptions

\SodiumException
\TypeError

Returns

string

hex2bin()

hex2bin(string $string) : string
package WordPress
see

Parameters

$string

string

Exceptions

\SodiumException
\TypeError

Returns

string

memcmp()

memcmp(string $a, string $b) : integer
package WordPress
see

Parameters

$a

string

$b

string

Exceptions

\SodiumException
\TypeError

Returns

integer

memzero()

memzero(string $str) : void
package WordPress
see

Parameters

$str

string

Exceptions

\SodiumException
\TypeError

randombytes_buf()

randombytes_buf(integer $amount) : string
package WordPress
see

Parameters

$amount

integer

Exceptions

\TypeError

Returns

string

randombytes_random16()

randombytes_random16() : integer
package WordPress
see

Returns

integer

randombytes_uniform()

randombytes_uniform(integer $upperLimit) : integer
package WordPress
see

Parameters

$upperLimit

integer

Exceptions

\SodiumException
\Error

Returns

integer

Constants

 

CRYPTO_AEAD_AES256GCM_ABYTES

CRYPTO_AEAD_AES256GCM_ABYTES = \ParagonIE_Sodium_Compat::CRYPTO_AEAD_AES256GCM_ABYTES 
package WordPress
 

CRYPTO_AEAD_AES256GCM_KEYBYTES

CRYPTO_AEAD_AES256GCM_KEYBYTES = \ParagonIE_Sodium_Compat::CRYPTO_AEAD_AES256GCM_KEYBYTES 
package WordPress
 

CRYPTO_AEAD_AES256GCM_NPUBBYTES

CRYPTO_AEAD_AES256GCM_NPUBBYTES = \ParagonIE_Sodium_Compat::CRYPTO_AEAD_AES256GCM_NPUBBYTES 
package WordPress
 

CRYPTO_AEAD_AES256GCM_NSECBYTES

CRYPTO_AEAD_AES256GCM_NSECBYTES = \ParagonIE_Sodium_Compat::CRYPTO_AEAD_AES256GCM_NSECBYTES 
package WordPress
 

CRYPTO_AEAD_CHACHA20POLY1305_ABYTES

CRYPTO_AEAD_CHACHA20POLY1305_ABYTES = \ParagonIE_Sodium_Compat::CRYPTO_AEAD_CHACHA20POLY1305_ABYTES 
package WordPress
 

CRYPTO_AEAD_CHACHA20POLY1305_IETF_ABYTES

CRYPTO_AEAD_CHACHA20POLY1305_IETF_ABYTES = \ParagonIE_Sodium_Compat::CRYPTO_AEAD_CHACHA20POLY1305_IETF_ABYTES 
package WordPress
 

CRYPTO_AEAD_CHACHA20POLY1305_IETF_KEYBYTES

CRYPTO_AEAD_CHACHA20POLY1305_IETF_KEYBYTES = \ParagonIE_Sodium_Compat::CRYPTO_AEAD_CHACHA20POLY1305_IETF_KEYBYTES 
package WordPress
 

CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES

CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES = \ParagonIE_Sodium_Compat::CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES 
package WordPress
 

CRYPTO_AEAD_CHACHA20POLY1305_IETF_NSECBYTES

CRYPTO_AEAD_CHACHA20POLY1305_IETF_NSECBYTES = \ParagonIE_Sodium_Compat::CRYPTO_AEAD_CHACHA20POLY1305_IETF_NSECBYTES 
package WordPress
 

CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES

CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES = \ParagonIE_Sodium_Compat::CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES 
package WordPress
 

CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES

CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES = \ParagonIE_Sodium_Compat::CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES 
package WordPress
 

CRYPTO_AEAD_CHACHA20POLY1305_NSECBYTES

CRYPTO_AEAD_CHACHA20POLY1305_NSECBYTES = \ParagonIE_Sodium_Compat::CRYPTO_AEAD_CHACHA20POLY1305_NSECBYTES 
package WordPress
 

CRYPTO_AUTH_BYTES

CRYPTO_AUTH_BYTES = \ParagonIE_Sodium_Compat::CRYPTO_AUTH_BYTES 
package WordPress
 

CRYPTO_AUTH_KEYBYTES

CRYPTO_AUTH_KEYBYTES = \ParagonIE_Sodium_Compat::CRYPTO_AUTH_KEYBYTES 
package WordPress
 

CRYPTO_BOX_KEYPAIRBYTES

CRYPTO_BOX_KEYPAIRBYTES = \ParagonIE_Sodium_Compat::CRYPTO_BOX_KEYPAIRBYTES 
package WordPress
 

CRYPTO_BOX_MACBYTES

CRYPTO_BOX_MACBYTES = \ParagonIE_Sodium_Compat::CRYPTO_BOX_MACBYTES 
package WordPress
 

CRYPTO_BOX_NONCEBYTES

CRYPTO_BOX_NONCEBYTES = \ParagonIE_Sodium_Compat::CRYPTO_BOX_NONCEBYTES 
package WordPress
 

CRYPTO_BOX_PUBLICKEYBYTES

CRYPTO_BOX_PUBLICKEYBYTES = \ParagonIE_Sodium_Compat::CRYPTO_BOX_PUBLICKEYBYTES 
package WordPress
 

CRYPTO_BOX_SEALBYTES

CRYPTO_BOX_SEALBYTES = \ParagonIE_Sodium_Compat::CRYPTO_BOX_SEALBYTES 
package WordPress
 

CRYPTO_BOX_SECRETKEYBYTES

CRYPTO_BOX_SECRETKEYBYTES = \ParagonIE_Sodium_Compat::CRYPTO_BOX_SECRETKEYBYTES 
package WordPress
 

CRYPTO_BOX_SEEDBYTES

CRYPTO_BOX_SEEDBYTES = \ParagonIE_Sodium_Compat::CRYPTO_BOX_SEEDBYTES 
package WordPress
 

CRYPTO_GENERICHASH_BYTES

CRYPTO_GENERICHASH_BYTES = \ParagonIE_Sodium_Compat::CRYPTO_GENERICHASH_BYTES 
package WordPress
 

CRYPTO_GENERICHASH_BYTES_MAX

CRYPTO_GENERICHASH_BYTES_MAX = \ParagonIE_Sodium_Compat::CRYPTO_GENERICHASH_BYTES_MAX 
package WordPress
 

CRYPTO_GENERICHASH_BYTES_MIN

CRYPTO_GENERICHASH_BYTES_MIN = \ParagonIE_Sodium_Compat::CRYPTO_GENERICHASH_BYTES_MIN 
package WordPress
 

CRYPTO_GENERICHASH_KEYBYTES

CRYPTO_GENERICHASH_KEYBYTES = \ParagonIE_Sodium_Compat::CRYPTO_GENERICHASH_KEYBYTES 
package WordPress
 

CRYPTO_GENERICHASH_KEYBYTES_MAX

CRYPTO_GENERICHASH_KEYBYTES_MAX = \ParagonIE_Sodium_Compat::CRYPTO_GENERICHASH_KEYBYTES_MAX 
package WordPress
 

CRYPTO_GENERICHASH_KEYBYTES_MIN

CRYPTO_GENERICHASH_KEYBYTES_MIN = \ParagonIE_Sodium_Compat::CRYPTO_GENERICHASH_KEYBYTES_MIN 
package WordPress
 

CRYPTO_KX_BYTES

CRYPTO_KX_BYTES = \ParagonIE_Sodium_Compat::CRYPTO_KX_BYTES 
package WordPress
 

CRYPTO_KX_PUBLICKEYBYTES

CRYPTO_KX_PUBLICKEYBYTES = \ParagonIE_Sodium_Compat::CRYPTO_KX_PUBLICKEYBYTES 
package WordPress
 

CRYPTO_KX_SECRETKEYBYTES

CRYPTO_KX_SECRETKEYBYTES = \ParagonIE_Sodium_Compat::CRYPTO_KX_SECRETKEYBYTES 
package WordPress
 

CRYPTO_KX_SEEDBYTES

CRYPTO_KX_SEEDBYTES = \ParagonIE_Sodium_Compat::CRYPTO_KX_SEEDBYTES 
package WordPress
 

CRYPTO_SCALARMULT_BYTES

CRYPTO_SCALARMULT_BYTES = \ParagonIE_Sodium_Compat::CRYPTO_SCALARMULT_BYTES 
package WordPress
 

CRYPTO_SCALARMULT_SCALARBYTES

CRYPTO_SCALARMULT_SCALARBYTES = \ParagonIE_Sodium_Compat::CRYPTO_SCALARMULT_SCALARBYTES 
package WordPress
 

CRYPTO_SECRETBOX_KEYBYTES

CRYPTO_SECRETBOX_KEYBYTES = \ParagonIE_Sodium_Compat::CRYPTO_SECRETBOX_KEYBYTES 
package WordPress
 

CRYPTO_SECRETBOX_MACBYTES

CRYPTO_SECRETBOX_MACBYTES = \ParagonIE_Sodium_Compat::CRYPTO_SECRETBOX_MACBYTES 
package WordPress
 

CRYPTO_SECRETBOX_NONCEBYTES

CRYPTO_SECRETBOX_NONCEBYTES = \ParagonIE_Sodium_Compat::CRYPTO_SECRETBOX_NONCEBYTES 
package WordPress
 

CRYPTO_SHORTHASH_BYTES

CRYPTO_SHORTHASH_BYTES = \ParagonIE_Sodium_Compat::CRYPTO_SHORTHASH_BYTES 
package WordPress
 

CRYPTO_SHORTHASH_KEYBYTES

CRYPTO_SHORTHASH_KEYBYTES = \ParagonIE_Sodium_Compat::CRYPTO_SHORTHASH_KEYBYTES 
package WordPress
 

CRYPTO_SIGN_BYTES

CRYPTO_SIGN_BYTES = \ParagonIE_Sodium_Compat::CRYPTO_SIGN_BYTES 
package WordPress
 

CRYPTO_SIGN_KEYPAIRBYTES

CRYPTO_SIGN_KEYPAIRBYTES = \ParagonIE_Sodium_Compat::CRYPTO_SIGN_KEYPAIRBYTES 
package WordPress
 

CRYPTO_SIGN_PUBLICKEYBYTES

CRYPTO_SIGN_PUBLICKEYBYTES = \ParagonIE_Sodium_Compat::CRYPTO_SIGN_PUBLICKEYBYTES 
package WordPress
 

CRYPTO_SIGN_SECRETKEYBYTES

CRYPTO_SIGN_SECRETKEYBYTES = \ParagonIE_Sodium_Compat::CRYPTO_SIGN_SECRETKEYBYTES 
package WordPress
 

CRYPTO_SIGN_SEEDBYTES

CRYPTO_SIGN_SEEDBYTES = \ParagonIE_Sodium_Compat::CRYPTO_SIGN_SEEDBYTES 
package WordPress
 

CRYPTO_STREAM_KEYBYTES

CRYPTO_STREAM_KEYBYTES = \ParagonIE_Sodium_Compat::CRYPTO_STREAM_KEYBYTES 
package WordPress
 

CRYPTO_STREAM_NONCEBYTES

CRYPTO_STREAM_NONCEBYTES = \ParagonIE_Sodium_Compat::CRYPTO_STREAM_NONCEBYTES 
package WordPress