Support for libsodium PECL package, and the upcoming PHP 7.2 built in extension The 2 versions of libsodium differ in the following ways:
PECL uses a Sodium namespace, the PHP version does not PECL exposes the extension as "libsodium", the PHP verions is "sodium" PHP prefixes functions and constants with "sodium_"
| Methods | ||
|---|---|---|
public
static
|
crypto_auth_verify($hmac, $crypt_string, $crypt_key)
|
# |
public
static
|
crypto_secretbox_open($crypt_string, $salt, $crypt_key)
|
# |
public
static
|
crypto_secretbox($string, $salt, $key)
|
# |
public
static
|
crypto_auth($ciphertext, $key)
|
# |
public
static
|
crypto_pwhash_str($password)
|
# |
public
static
|
crypto_pwhash_str_verify($hash, $password)
|
# |
public
static
|
randombytes_buf()
|
# |