Functions
bin2hex()
bin2hex(string $string) : string
Parameters
$string
string
Exceptions
\SodiumException |
|
\TypeError |
|
Returns
string
compare()
compare(string $a, string $b) : integer
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
Parameters
$message
string
$assocData
string
$nonce
string
$key
string
Returns
string
boolean
crypto_aead_aes256gcm_encrypt()
crypto_aead_aes256gcm_encrypt(string $message, string $assocData, string $nonce, string $key) : string
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
crypto_aead_chacha20poly1305_decrypt()
crypto_aead_chacha20poly1305_decrypt(string $message, string $assocData, string $nonce, string $key) : string | boolean
Parameters
$message
string
$assocData
string
$nonce
string
$key
string
Returns
string
boolean
crypto_aead_chacha20poly1305_encrypt()
crypto_aead_chacha20poly1305_encrypt(string $message, string $assocData, string $nonce, string $key) : string
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
Parameters
$message
string
$assocData
string
$nonce
string
$key
string
Returns
string
boolean
crypto_aead_chacha20poly1305_ietf_encrypt()
crypto_aead_chacha20poly1305_ietf_encrypt(string $message, string $assocData, string $nonce, string $key) : string
Parameters
$message
string
$assocData
string
$nonce
string
$key
string
Exceptions
\SodiumException |
|
\TypeError |
|
Returns
string
crypto_auth()
crypto_auth(string $message, string $key) : string
Parameters
$message
string
$key
string
Exceptions
\SodiumException |
|
\TypeError |
|
Returns
string
crypto_auth_verify()
crypto_auth_verify(string $mac, string $message, string $key) : boolean
Parameters
$mac
string
$message
string
$key
string
Exceptions
\SodiumException |
|
\TypeError |
|
Returns
boolean
crypto_box()
crypto_box(string $message, string $nonce, string $kp) : string
Parameters
$message
string
$nonce
string
$kp
string
Exceptions
\SodiumException |
|
\TypeError |
|
Returns
string
crypto_box_keypair()
crypto_box_keypair() : string
Exceptions
\SodiumException |
|
\TypeError |
|
Returns
string
crypto_box_keypair_from_secretkey_and_publickey()
crypto_box_keypair_from_secretkey_and_publickey(string $sk, string $pk) : string
Parameters
$sk
string
$pk
string
Exceptions
\SodiumException |
|
\TypeError |
|
Returns
string
crypto_box_open()
crypto_box_open(string $message, string $nonce, string $kp) : string | boolean
Parameters
$message
string
$nonce
string
$kp
string
Returns
string
boolean
crypto_box_publickey()
crypto_box_publickey(string $keypair) : string
Parameters
$keypair
string
Exceptions
\SodiumException |
|
\TypeError |
|
Returns
string
crypto_box_publickey_from_secretkey()
crypto_box_publickey_from_secretkey(string $sk) : string
Parameters
$sk
string
Exceptions
\SodiumException |
|
\TypeError |
|
Returns
string
crypto_box_seal()
crypto_box_seal(string $message, string $publicKey) : string
Parameters
$message
string
$publicKey
string
Exceptions
\SodiumException |
|
\TypeError |
|
Returns
string
crypto_box_seal_open()
crypto_box_seal_open(string $message, string $kp) : string | boolean
Parameters
$message
string
$kp
string
Returns
string
boolean
crypto_box_secretkey()
crypto_box_secretkey(string $keypair) : string
Parameters
$keypair
string
Exceptions
\SodiumException |
|
\TypeError |
|
Returns
string
crypto_generichash()
crypto_generichash(string $message, string|null $key = null
, integer $outLen = 32
) : string
Parameters
$message
string
$key
string
null
$outLen
integer
Exceptions
\SodiumException |
|
\TypeError |
|
Returns
string
crypto_generichash_final()
crypto_generichash_final(string|null $ctx, integer $outputLength = 32
) : string
Parameters
$ctx
string
null
$outputLength
integer
Exceptions
\SodiumException |
|
\TypeError |
|
Returns
string
crypto_generichash_init()
crypto_generichash_init(string|null $key = null
, integer $outLen = 32
) : string
Parameters
$key
string
null
$outLen
integer
Exceptions
\SodiumException |
|
\TypeError |
|
Returns
string
crypto_generichash_update()
crypto_generichash_update(string|null $ctx, string $message = ''
) : void
Parameters
$ctx
string
null
$message
string
Exceptions
\SodiumException |
|
\TypeError |
|
crypto_kx()
crypto_kx(string $my_secret, string $their_public, string $client_public, string $server_public) : string
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
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
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
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
Parameters
$passwd
string
$hash
string
Exceptions
\SodiumException |
|
\TypeError |
|
Returns
boolean
crypto_pwhash_str()
crypto_pwhash_str(string $passwd, integer $opslimit, integer $memlimit) : string
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
Parameters
$passwd
string
$hash
string
Exceptions
\SodiumException |
|
\TypeError |
|
Returns
boolean
crypto_scalarmult()
crypto_scalarmult(string $n, string $p) : string
Parameters
$n
string
$p
string
Exceptions
\SodiumException |
|
\TypeError |
|
Returns
string
crypto_scalarmult_base()
crypto_scalarmult_base(string $n) : string
Parameters
$n
string
Exceptions
\SodiumException |
|
\TypeError |
|
Returns
string
crypto_secretbox()
crypto_secretbox(string $message, string $nonce, string $key) : string
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
Parameters
$message
string
$nonce
string
$key
string
Returns
string
boolean
crypto_shorthash()
crypto_shorthash(string $message, string $key = ''
) : string
Parameters
$message
string
$key
string
Exceptions
\SodiumException |
|
\TypeError |
|
Returns
string
crypto_sign()
crypto_sign(string $message, string $sk) : string
Parameters
$message
string
$sk
string
Exceptions
\SodiumException |
|
\TypeError |
|
Returns
string
crypto_sign_detached()
crypto_sign_detached(string $message, string $sk) : string
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
Parameters
$pk
string
Exceptions
\SodiumException |
|
\TypeError |
|
Returns
string
crypto_sign_ed25519_sk_to_curve25519()
crypto_sign_ed25519_sk_to_curve25519(string $sk) : string
Parameters
$sk
string
Exceptions
\SodiumException |
|
\TypeError |
|
Returns
string
crypto_sign_keypair()
crypto_sign_keypair() : string
Exceptions
\SodiumException |
|
\TypeError |
|
Returns
string
crypto_sign_open()
crypto_sign_open(string $signedMessage, string $pk) : string | boolean
Parameters
$signedMessage
string
$pk
string
Returns
string
boolean
crypto_sign_publickey()
crypto_sign_publickey(string $keypair) : string
Parameters
$keypair
string
Exceptions
\SodiumException |
|
\TypeError |
|
Returns
string
crypto_sign_publickey_from_secretkey()
crypto_sign_publickey_from_secretkey(string $sk) : string
Parameters
$sk
string
Exceptions
\SodiumException |
|
\TypeError |
|
Returns
string
crypto_sign_secretkey()
crypto_sign_secretkey(string $keypair) : string
Parameters
$keypair
string
Exceptions
\SodiumException |
|
\TypeError |
|
Returns
string
crypto_sign_seed_keypair()
crypto_sign_seed_keypair(string $seed) : string
Parameters
$seed
string
Exceptions
\SodiumException |
|
\TypeError |
|
Returns
string
crypto_sign_verify_detached()
crypto_sign_verify_detached(string $signature, string $message, string $pk) : boolean
Parameters
$signature
string
$message
string
$pk
string
Exceptions
\SodiumException |
|
\TypeError |
|
Returns
boolean
crypto_stream()
crypto_stream(integer $len, string $nonce, string $key) : string
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
Parameters
$message
string
$nonce
string
$key
string
Exceptions
\SodiumException |
|
\TypeError |
|
Returns
string
hex2bin()
hex2bin(string $string) : string
Parameters
$string
string
Exceptions
\SodiumException |
|
\TypeError |
|
Returns
string
memcmp()
memcmp(string $a, string $b) : integer
Parameters
$a
string
$b
string
Exceptions
\SodiumException |
|
\TypeError |
|
Returns
integer
memzero()
memzero(string $str) : void
Parameters
$str
string
Exceptions
\SodiumException |
|
\TypeError |
|
randombytes_buf()
randombytes_buf(integer $amount) : string
Parameters
$amount
integer
Exceptions
Returns
string
randombytes_random16()
randombytes_random16() : integer
Constants
CRYPTO_AEAD_AES256GCM_ABYTES
CRYPTO_AEAD_AES256GCM_ABYTES = \ParagonIE_Sodium_Compat::CRYPTO_AEAD_AES256GCM_ABYTES
CRYPTO_AEAD_AES256GCM_KEYBYTES
CRYPTO_AEAD_AES256GCM_KEYBYTES = \ParagonIE_Sodium_Compat::CRYPTO_AEAD_AES256GCM_KEYBYTES
CRYPTO_AEAD_AES256GCM_NPUBBYTES
CRYPTO_AEAD_AES256GCM_NPUBBYTES = \ParagonIE_Sodium_Compat::CRYPTO_AEAD_AES256GCM_NPUBBYTES
CRYPTO_AEAD_AES256GCM_NSECBYTES
CRYPTO_AEAD_AES256GCM_NSECBYTES = \ParagonIE_Sodium_Compat::CRYPTO_AEAD_AES256GCM_NSECBYTES
CRYPTO_AEAD_CHACHA20POLY1305_ABYTES
CRYPTO_AEAD_CHACHA20POLY1305_ABYTES = \ParagonIE_Sodium_Compat::CRYPTO_AEAD_CHACHA20POLY1305_ABYTES
CRYPTO_AEAD_CHACHA20POLY1305_IETF_ABYTES
CRYPTO_AEAD_CHACHA20POLY1305_IETF_ABYTES = \ParagonIE_Sodium_Compat::CRYPTO_AEAD_CHACHA20POLY1305_IETF_ABYTES
CRYPTO_AEAD_CHACHA20POLY1305_IETF_KEYBYTES
CRYPTO_AEAD_CHACHA20POLY1305_IETF_KEYBYTES = \ParagonIE_Sodium_Compat::CRYPTO_AEAD_CHACHA20POLY1305_IETF_KEYBYTES
CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES
CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES = \ParagonIE_Sodium_Compat::CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES
CRYPTO_AEAD_CHACHA20POLY1305_IETF_NSECBYTES
CRYPTO_AEAD_CHACHA20POLY1305_IETF_NSECBYTES = \ParagonIE_Sodium_Compat::CRYPTO_AEAD_CHACHA20POLY1305_IETF_NSECBYTES
CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES
CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES = \ParagonIE_Sodium_Compat::CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES
CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES
CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES = \ParagonIE_Sodium_Compat::CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES
CRYPTO_AEAD_CHACHA20POLY1305_NSECBYTES
CRYPTO_AEAD_CHACHA20POLY1305_NSECBYTES = \ParagonIE_Sodium_Compat::CRYPTO_AEAD_CHACHA20POLY1305_NSECBYTES
CRYPTO_AUTH_BYTES
CRYPTO_AUTH_BYTES = \ParagonIE_Sodium_Compat::CRYPTO_AUTH_BYTES
CRYPTO_AUTH_KEYBYTES
CRYPTO_AUTH_KEYBYTES = \ParagonIE_Sodium_Compat::CRYPTO_AUTH_KEYBYTES
CRYPTO_BOX_KEYPAIRBYTES
CRYPTO_BOX_KEYPAIRBYTES = \ParagonIE_Sodium_Compat::CRYPTO_BOX_KEYPAIRBYTES
CRYPTO_BOX_MACBYTES
CRYPTO_BOX_MACBYTES = \ParagonIE_Sodium_Compat::CRYPTO_BOX_MACBYTES
CRYPTO_BOX_NONCEBYTES
CRYPTO_BOX_NONCEBYTES = \ParagonIE_Sodium_Compat::CRYPTO_BOX_NONCEBYTES
CRYPTO_BOX_PUBLICKEYBYTES
CRYPTO_BOX_PUBLICKEYBYTES = \ParagonIE_Sodium_Compat::CRYPTO_BOX_PUBLICKEYBYTES
CRYPTO_BOX_SEALBYTES
CRYPTO_BOX_SEALBYTES = \ParagonIE_Sodium_Compat::CRYPTO_BOX_SEALBYTES
CRYPTO_BOX_SECRETKEYBYTES
CRYPTO_BOX_SECRETKEYBYTES = \ParagonIE_Sodium_Compat::CRYPTO_BOX_SECRETKEYBYTES
CRYPTO_BOX_SEEDBYTES
CRYPTO_BOX_SEEDBYTES = \ParagonIE_Sodium_Compat::CRYPTO_BOX_SEEDBYTES
CRYPTO_GENERICHASH_BYTES
CRYPTO_GENERICHASH_BYTES = \ParagonIE_Sodium_Compat::CRYPTO_GENERICHASH_BYTES
CRYPTO_GENERICHASH_BYTES_MAX
CRYPTO_GENERICHASH_BYTES_MAX = \ParagonIE_Sodium_Compat::CRYPTO_GENERICHASH_BYTES_MAX
CRYPTO_GENERICHASH_BYTES_MIN
CRYPTO_GENERICHASH_BYTES_MIN = \ParagonIE_Sodium_Compat::CRYPTO_GENERICHASH_BYTES_MIN
CRYPTO_GENERICHASH_KEYBYTES
CRYPTO_GENERICHASH_KEYBYTES = \ParagonIE_Sodium_Compat::CRYPTO_GENERICHASH_KEYBYTES
CRYPTO_GENERICHASH_KEYBYTES_MAX
CRYPTO_GENERICHASH_KEYBYTES_MAX = \ParagonIE_Sodium_Compat::CRYPTO_GENERICHASH_KEYBYTES_MAX
CRYPTO_GENERICHASH_KEYBYTES_MIN
CRYPTO_GENERICHASH_KEYBYTES_MIN = \ParagonIE_Sodium_Compat::CRYPTO_GENERICHASH_KEYBYTES_MIN
CRYPTO_KX_BYTES
CRYPTO_KX_BYTES = \ParagonIE_Sodium_Compat::CRYPTO_KX_BYTES
CRYPTO_KX_PUBLICKEYBYTES
CRYPTO_KX_PUBLICKEYBYTES = \ParagonIE_Sodium_Compat::CRYPTO_KX_PUBLICKEYBYTES
CRYPTO_KX_SECRETKEYBYTES
CRYPTO_KX_SECRETKEYBYTES = \ParagonIE_Sodium_Compat::CRYPTO_KX_SECRETKEYBYTES
CRYPTO_KX_SEEDBYTES
CRYPTO_KX_SEEDBYTES = \ParagonIE_Sodium_Compat::CRYPTO_KX_SEEDBYTES
CRYPTO_SCALARMULT_BYTES
CRYPTO_SCALARMULT_BYTES = \ParagonIE_Sodium_Compat::CRYPTO_SCALARMULT_BYTES
CRYPTO_SCALARMULT_SCALARBYTES
CRYPTO_SCALARMULT_SCALARBYTES = \ParagonIE_Sodium_Compat::CRYPTO_SCALARMULT_SCALARBYTES
CRYPTO_SECRETBOX_KEYBYTES
CRYPTO_SECRETBOX_KEYBYTES = \ParagonIE_Sodium_Compat::CRYPTO_SECRETBOX_KEYBYTES
CRYPTO_SECRETBOX_MACBYTES
CRYPTO_SECRETBOX_MACBYTES = \ParagonIE_Sodium_Compat::CRYPTO_SECRETBOX_MACBYTES
CRYPTO_SECRETBOX_NONCEBYTES
CRYPTO_SECRETBOX_NONCEBYTES = \ParagonIE_Sodium_Compat::CRYPTO_SECRETBOX_NONCEBYTES
CRYPTO_SHORTHASH_BYTES
CRYPTO_SHORTHASH_BYTES = \ParagonIE_Sodium_Compat::CRYPTO_SHORTHASH_BYTES
CRYPTO_SHORTHASH_KEYBYTES
CRYPTO_SHORTHASH_KEYBYTES = \ParagonIE_Sodium_Compat::CRYPTO_SHORTHASH_KEYBYTES
CRYPTO_SIGN_BYTES
CRYPTO_SIGN_BYTES = \ParagonIE_Sodium_Compat::CRYPTO_SIGN_BYTES
CRYPTO_SIGN_KEYPAIRBYTES
CRYPTO_SIGN_KEYPAIRBYTES = \ParagonIE_Sodium_Compat::CRYPTO_SIGN_KEYPAIRBYTES
CRYPTO_SIGN_PUBLICKEYBYTES
CRYPTO_SIGN_PUBLICKEYBYTES = \ParagonIE_Sodium_Compat::CRYPTO_SIGN_PUBLICKEYBYTES
CRYPTO_SIGN_SECRETKEYBYTES
CRYPTO_SIGN_SECRETKEYBYTES = \ParagonIE_Sodium_Compat::CRYPTO_SIGN_SECRETKEYBYTES
CRYPTO_SIGN_SEEDBYTES
CRYPTO_SIGN_SEEDBYTES = \ParagonIE_Sodium_Compat::CRYPTO_SIGN_SEEDBYTES
CRYPTO_STREAM_KEYBYTES
CRYPTO_STREAM_KEYBYTES = \ParagonIE_Sodium_Compat::CRYPTO_STREAM_KEYBYTES
CRYPTO_STREAM_NONCEBYTES
CRYPTO_STREAM_NONCEBYTES = \ParagonIE_Sodium_Compat::CRYPTO_STREAM_NONCEBYTES