[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/sodium_compat/src/ -> Crypto.php (summary)

Class ParagonIE_Sodium_Crypto ATTENTION!

File Size: 1655 lines (55 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 41 functions

  aead_chacha20poly1305_decrypt()
  aead_chacha20poly1305_encrypt()
  aead_chacha20poly1305_ietf_decrypt()
  aead_chacha20poly1305_ietf_encrypt()
  aead_xchacha20poly1305_ietf_decrypt()
  aead_xchacha20poly1305_ietf_encrypt()
  auth()
  auth_verify()
  box()
  box_seal()
  box_seal_open()
  box_beforenm()
  box_keypair()
  box_seed_keypair()
  box_keypair_from_secretkey_and_publickey()
  box_secretkey()
  box_publickey()
  box_publickey_from_secretkey()
  box_open()
  generichash()
  generichash_final()
  generichash_init()
  generichash_init_salt_personal()
  generichash_update()
  keyExchange()
  scalarmult()
  scalarmult_base()
  scalarmult_throw_if_zero()
  secretbox()
  secretbox_open()
  secretbox_xchacha20poly1305()
  secretbox_xchacha20poly1305_open()
  secretstream_xchacha20poly1305_init_push()
  secretstream_xchacha20poly1305_init_pull()
  secretstream_xchacha20poly1305_push()
  secretstream_xchacha20poly1305_pull()
  secretstream_xchacha20poly1305_rekey()
  sign_detached()
  sign()
  sign_open()
  sign_verify_detached()

Functions
Functions that are not part of a class:

aead_chacha20poly1305_decrypt($message = '',$ad = '',$nonce = '',$key = '')   X-Ref
AEAD Decryption with ChaCha20-Poly1305

return: string
param: string $message
param: string $ad
param: string $nonce
param: string $key

aead_chacha20poly1305_encrypt($message = '',$ad = '',$nonce = '',$key = '')   X-Ref
AEAD Encryption with ChaCha20-Poly1305

return: string
param: string $message
param: string $ad
param: string $nonce
param: string $key

aead_chacha20poly1305_ietf_decrypt($message = '',$ad = '',$nonce = '',$key = '')   X-Ref
AEAD Decryption with ChaCha20-Poly1305, IETF mode (96-bit nonce)

return: string
param: string $message
param: string $ad
param: string $nonce
param: string $key

aead_chacha20poly1305_ietf_encrypt($message = '',$ad = '',$nonce = '',$key = '')   X-Ref
AEAD Encryption with ChaCha20-Poly1305, IETF mode (96-bit nonce)

return: string
param: string $message
param: string $ad
param: string $nonce
param: string $key

aead_xchacha20poly1305_ietf_decrypt($message = '',$ad = '',$nonce = '',$key = '')   X-Ref
AEAD Decryption with ChaCha20-Poly1305, IETF mode (96-bit nonce)

return: string
param: string $message
param: string $ad
param: string $nonce
param: string $key

aead_xchacha20poly1305_ietf_encrypt($message = '',$ad = '',$nonce = '',$key = '')   X-Ref
AEAD Encryption with ChaCha20-Poly1305, IETF mode (96-bit nonce)

return: string
param: string $message
param: string $ad
param: string $nonce
param: string $key

auth($message, $key)   X-Ref
HMAC-SHA-512-256 (a.k.a. the leftmost 256 bits of HMAC-SHA-512)

return: string
param: string $message
param: string $key

auth_verify($mac, $message, $key)   X-Ref
HMAC-SHA-512-256 validation. Constant-time via hash_equals().

return: bool
param: string $mac
param: string $message
param: string $key

box($plaintext, $nonce, $keypair)   X-Ref
X25519 key exchange followed by XSalsa20Poly1305 symmetric encryption

return: string
param: string $plaintext
param: string $nonce
param: string $keypair

box_seal($message, $publicKey)   X-Ref
X25519-XSalsa20-Poly1305 with one ephemeral X25519 keypair.

return: string
param: string $message
param: string $publicKey

box_seal_open($message, $keypair)   X-Ref
Opens a message encrypted via box_seal().

return: string
param: string $message
param: string $keypair

box_beforenm($sk, $pk)   X-Ref
Used by crypto_box() to get the crypto_secretbox() key.

return: string
param: string $sk
param: string $pk

box_keypair()   X-Ref

return: string

box_seed_keypair($seed)   X-Ref

return: string
param: string $seed

box_keypair_from_secretkey_and_publickey($sKey, $pKey)   X-Ref

return: string
param: string $sKey
param: string $pKey

box_secretkey($keypair)   X-Ref

return: string
param: string $keypair

box_publickey($keypair)   X-Ref

return: string
param: string $keypair

box_publickey_from_secretkey($sKey)   X-Ref

return: string
param: string $sKey

box_open($ciphertext, $nonce, $keypair)   X-Ref
Decrypt a message encrypted with box().

return: string
param: string $ciphertext
param: string $nonce
param: string $keypair

generichash($message, $key = '', $outlen = 32)   X-Ref
Calculate a BLAKE2b hash.

return: string
param: string $message
param: string|null $key
param: int $outlen

generichash_final($ctx, $outlen = 32)   X-Ref
Finalize a BLAKE2b hashing context, returning the hash.

return: string
param: string $ctx
param: int $outlen

generichash_init($key = '', $outputLength = 32)   X-Ref
Initialize a hashing context for BLAKE2b.

return: string
param: string $key
param: int $outputLength

generichash_init_salt_personal($key = '',$outputLength = 32,$salt = '',$personal = '')   X-Ref
Initialize a hashing context for BLAKE2b.

return: string
param: string $key
param: int $outputLength
param: string $salt
param: string $personal

generichash_update($ctx, $message)   X-Ref
Update a hashing context for BLAKE2b with $message

return: string
param: string $ctx
param: string $message

keyExchange($my_sk, $their_pk, $client_pk, $server_pk)   X-Ref
Libsodium's crypto_kx().

return: string
param: string $my_sk
param: string $their_pk
param: string $client_pk
param: string $server_pk

scalarmult($sKey, $pKey)   X-Ref
ECDH over Curve25519

return: string
param: string $sKey
param: string $pKey

scalarmult_base($secret)   X-Ref
ECDH over Curve25519, using the basepoint.
Used to get a secret key from a public key.

return: string
param: string $secret

scalarmult_throw_if_zero($q)   X-Ref
This throws an Error if a zero public key was passed to the function.

return: void
param: string $q

secretbox($plaintext, $nonce, $key)   X-Ref
XSalsa20-Poly1305 authenticated symmetric-key encryption.

return: string
param: string $plaintext
param: string $nonce
param: string $key

secretbox_open($ciphertext, $nonce, $key)   X-Ref
Decrypt a ciphertext generated via secretbox().

return: string
param: string $ciphertext
param: string $nonce
param: string $key

secretbox_xchacha20poly1305($plaintext, $nonce, $key)   X-Ref
XChaCha20-Poly1305 authenticated symmetric-key encryption.

return: string
param: string $plaintext
param: string $nonce
param: string $key

secretbox_xchacha20poly1305_open($ciphertext, $nonce, $key)   X-Ref
Decrypt a ciphertext generated via secretbox_xchacha20poly1305().

return: string
param: string $ciphertext
param: string $nonce
param: string $key

secretstream_xchacha20poly1305_init_push($key)   X-Ref

return: array<int, string> Returns a state and a header.
param: string $key

secretstream_xchacha20poly1305_init_pull($key, $header)   X-Ref

return: string Returns a state.
param: string $key
param: string $header

secretstream_xchacha20poly1305_push(&$state, $msg, $aad = '', $tag = 0)   X-Ref

return: string
param: string $state
param: string $msg
param: string $aad
param: int $tag

secretstream_xchacha20poly1305_pull(&$state, $cipher, $aad = '')   X-Ref

return: bool|array{0: string, 1: int}
param: string $state
param: string $cipher
param: string $aad

secretstream_xchacha20poly1305_rekey(&$state)   X-Ref

return: void
param: string $state

sign_detached($message, $sk)   X-Ref
Detached Ed25519 signature.

return: string
param: string $message
param: string $sk

sign($message, $sk)   X-Ref
Attached Ed25519 signature. (Returns a signed message.)

return: string
param: string $message
param: string $sk

sign_open($signedMessage, $pk)   X-Ref
Opens a signed message. If valid, returns the message.

return: string
param: string $signedMessage
param: string $pk

sign_verify_detached($signature, $message, $pk)   X-Ref
Verify a detached signature of a given message and public key.

return: bool
param: string $signature
param: string $message
param: string $pk



Generated: Tue Mar 19 01:00:02 2024 Cross-referenced by PHPXref 0.7.1