salsa20_KEY
salsa20_KEY
Salt
A collections of NaCl cryptography library for PHP.
instance() : \Salt
crypto_sign( $msg, $mlen, $secretkey) : \FieldElement
Signs a message using the signer's private key and returns the signed message.
$msg | ||
$mlen | ||
$secretkey |
signed message
decodeInput( $value) : \FieldElement
Get bytes presentation from a value.
$value |
onetimeauth( $msg, $key) : \FieldElement
Authenticates a message using a secret key.
$msg | ||
$key |
16 bytes authenticator
secretbox( $msg, $nonce, $key) : \FieldElement
Encrypts and authenticates a message using a secret key and a nonce.
$msg | ||
$nonce | ||
$key |
secretbox_open( $ciphertext, $nonce, $key) : \FieldElement
Verifies and decrypts a chipertext using a secret key and a nonce.
$ciphertext | ||
$nonce | ||
$key |
scalarmult( $secretkey, $publickey) : \FieldElement
Curve25519 scalar multiplication.
$secretkey | ||
$publickey |
scalarmult_base( $secretkey) : \FieldElement
Curve25519 scalar base multiplication.
$secretkey |
box( $msg, $secretkey, $publickey, $nonce) : \FieldElement
Encrypts and authenticates a message using sender's secret key, receiver's public key and a nonce.
$msg | ||
$secretkey | ||
$publickey | ||
$nonce |
chipertext
box_open( $ciphertext, $secretkey, $publickey, $nonce) : \FieldElement
Decrypts a chipertext using the receiver's secret key, sender's public key and a nonce.
$ciphertext | ||
$secretkey | ||
$publickey | ||
$nonce |
the message
sign( $msg, $secretkey) : \FieldElement
Signs a message using the signer's private key and returns the signature.
$msg | ||
$secretkey |
64 byte signature
encrypt( $input, $data, $nonce, $secretkey) : \FieldElement
Chacha20Poly1305 AEAD encryption.
$input | ||
$data | ||
$nonce | ||
$secretkey |
ciphertext
decrypt( $ciphertext, $data, $nonce, $secretkey) : \FieldElement
Chacha20Poly1305 AEAD decryption.
$ciphertext | ||
$data | ||
$nonce | ||
$secretkey |
the message
hash( $str, $key = null) : \FieldElement
Generate hash value using Blake2b.
$str | ||
$key |
64 byte