Joomla CMS  4.2.2
Documentation des API du CMS Joomla en version 4.2.2
Référence de la classe ParagonIE_Sodium_Crypto
+ Graphe d'héritage de ParagonIE_Sodium_Crypto:

Fonctions membres publiques statiques

static aead_xchacha20poly1305_ietf_decrypt ( $message='', $ad='', $nonce='', $key='')
 
static aead_xchacha20poly1305_ietf_encrypt ( $message='', $ad='', $nonce='', $key='')
 
static auth ($message, $key)
 
static auth_verify ($mac, $message, $key)
 
static box ($plaintext, $nonce, $keypair)
 
static box_beforenm ($sk, $pk)
 
static box_keypair ()
 
static box_seed_keypair ($seed)
 
static box_keypair_from_secretkey_and_publickey ($sKey, $pKey)
 
static box_secretkey ($keypair)
 
static box_publickey ($keypair)
 
static box_publickey_from_secretkey ($sKey)
 
static box_open ($ciphertext, $nonce, $keypair)
 
static keyExchange ($my_sk, $their_pk, $client_pk, $server_pk)
 
static scalarmult ($sKey, $pKey)
 
static scalarmult_base ($secret)
 
static secretstream_xchacha20poly1305_init_push ($key)
 
static secretstream_xchacha20poly1305_init_pull ($key, $header)
 
static secretstream_xchacha20poly1305_rekey (&$state)
 
static sign_detached ($message, $sk)
 
static sign ($message, $sk)
 
static sign_open ($signedMessage, $pk)
 
static sign_verify_detached ($signature, $message, $pk)
 

Champs de données

const aead_chacha20poly1305_KEYBYTES = 32
 
const aead_chacha20poly1305_NSECBYTES = 0
 
const aead_chacha20poly1305_NPUBBYTES = 8
 
const aead_chacha20poly1305_ABYTES = 16
 
const aead_chacha20poly1305_IETF_KEYBYTES = 32
 
const aead_chacha20poly1305_IETF_NSECBYTES = 0
 
const aead_chacha20poly1305_IETF_NPUBBYTES = 12
 
const aead_chacha20poly1305_IETF_ABYTES = 16
 
const aead_xchacha20poly1305_IETF_KEYBYTES = 32
 
const aead_xchacha20poly1305_IETF_NSECBYTES = 0
 
const aead_xchacha20poly1305_IETF_NPUBBYTES = 24
 
const aead_xchacha20poly1305_IETF_ABYTES = 16
 
const box_curve25519xsalsa20poly1305_SEEDBYTES = 32
 
const box_curve25519xsalsa20poly1305_PUBLICKEYBYTES = 32
 
const box_curve25519xsalsa20poly1305_SECRETKEYBYTES = 32
 
const box_curve25519xsalsa20poly1305_BEFORENMBYTES = 32
 
const box_curve25519xsalsa20poly1305_NONCEBYTES = 24
 
const box_curve25519xsalsa20poly1305_MACBYTES = 16
 
const box_curve25519xsalsa20poly1305_BOXZEROBYTES = 16
 
const box_curve25519xsalsa20poly1305_ZEROBYTES = 32
 
const onetimeauth_poly1305_BYTES = 16
 
const onetimeauth_poly1305_KEYBYTES = 32
 
const secretbox_xsalsa20poly1305_KEYBYTES = 32
 
const secretbox_xsalsa20poly1305_NONCEBYTES = 24
 
const secretbox_xsalsa20poly1305_MACBYTES = 16
 
const secretbox_xsalsa20poly1305_BOXZEROBYTES = 16
 
const secretbox_xsalsa20poly1305_ZEROBYTES = 32
 
const secretbox_xchacha20poly1305_KEYBYTES = 32
 
const secretbox_xchacha20poly1305_NONCEBYTES = 24
 
const secretbox_xchacha20poly1305_MACBYTES = 16
 
const secretbox_xchacha20poly1305_BOXZEROBYTES = 16
 
const secretbox_xchacha20poly1305_ZEROBYTES = 32
 
const stream_salsa20_KEYBYTES = 32
 

Fonctions membres protégées statiques

static scalarmult_throw_if_zero ($q)
 

Description détaillée

Class ParagonIE_Sodium_Crypto

ATTENTION!

If you are using this library, you should be using ParagonIE_Sodium_Compat in your code, not this class.

Documentation des fonctions membres

◆ aead_xchacha20poly1305_ietf_decrypt()

static aead_xchacha20poly1305_ietf_decrypt (   $message = '',
  $ad = '',
  $nonce = '',
  $key = '' 
)
static

AEAD Decryption with ChaCha20-Poly1305, IETF mode (96-bit nonce)

Références $key, $message, ParagonIE_Sodium_Core_HChaCha20\hChaCha20(), et ParagonIE_Sodium_Core_Util\substr().

Référencé par ParagonIE_Sodium_Compat\crypto_aead_xchacha20poly1305_ietf_decrypt().

◆ aead_xchacha20poly1305_ietf_encrypt()

static aead_xchacha20poly1305_ietf_encrypt (   $message = '',
  $ad = '',
  $nonce = '',
  $key = '' 
)
static

AEAD Encryption with ChaCha20-Poly1305, IETF mode (96-bit nonce)

Références $key, $message, ParagonIE_Sodium_Core_HChaCha20\hChaCha20(), et ParagonIE_Sodium_Core_Util\substr().

Référencé par ParagonIE_Sodium_Compat\crypto_aead_xchacha20poly1305_ietf_encrypt().

◆ auth()

static auth (   $message,
  $key 
)
static

HMAC-SHA-512-256 (a.k.a. the leftmost 256 bits of HMAC-SHA-512)

Références $key, $message, et ParagonIE_Sodium_Core_Util\substr().

Référencé par ParagonIE_Sodium_Compat\crypto_auth().

◆ auth_verify()

static auth_verify (   $mac,
  $message,
  $key 
)
static

HMAC-SHA-512-256 validation. Constant-time via hash_equals().

Références $key, et $message.

Référencé par ParagonIE_Sodium_Compat\crypto_auth_verify().

◆ box()

static box (   $plaintext,
  $nonce,
  $keypair 
)
static

X25519 key exchange followed by XSalsa20Poly1305 symmetric encryption

Références $c.

Référencé par ParagonIE_Sodium_Compat\crypto_box().

◆ box_beforenm()

static box_beforenm (   $sk,
  $pk 
)
static

Used by crypto_box() to get the crypto_secretbox() key.

Références ParagonIE_Sodium_Core_HSalsa20\hsalsa20().

Référencé par ParagonIE_Sodium_File\box_decrypt(), et ParagonIE_Sodium_File\box_encrypt().

◆ box_keypair()

static box_keypair ( )
static

◆ box_keypair_from_secretkey_and_publickey()

static box_keypair_from_secretkey_and_publickey (   $sKey,
  $pKey 
)
static

◆ box_open()

static box_open (   $ciphertext,
  $nonce,
  $keypair 
)
static

Decrypt a message encrypted with box().

Référencé par ParagonIE_Sodium_Compat\crypto_box_open().

◆ box_publickey()

◆ box_publickey_from_secretkey()

◆ box_secretkey()

◆ box_seed_keypair()

static box_seed_keypair (   $seed)
static
Paramètres
string$seed
Renvoie
string
Exceptions
SodiumException
TypeError

Références ParagonIE_Sodium_Core_Util\substr().

Référencé par ParagonIE_Sodium_Compat\crypto_box_seed_keypair().

◆ keyExchange()

static keyExchange (   $my_sk,
  $their_pk,
  $client_pk,
  $server_pk 
)
static

◆ scalarmult()

static scalarmult (   $sKey,
  $pKey 
)
static

ECDH over Curve25519

Référencé par ParagonIE_Sodium_Compat\crypto_scalarmult().

◆ scalarmult_base()

static scalarmult_base (   $secret)
static

ECDH over Curve25519, using the basepoint. Used to get a secret key from a public key.

Paramètres
string$secret
Renvoie
string
Exceptions
SodiumException
TypeError

Références ParagonIE_Sodium_Core_X25519\crypto_scalarmult_curve25519_ref10_base().

Référencé par ParagonIE_Sodium_Compat\crypto_scalarmult_base().

◆ scalarmult_throw_if_zero()

static scalarmult_throw_if_zero (   $q)
staticprotected

This throws an Error if a zero public key was passed to the function.

Paramètres
string$q
Renvoie
void
Exceptions
SodiumException
TypeError

Références $i.

◆ secretstream_xchacha20poly1305_init_pull()

static secretstream_xchacha20poly1305_init_pull (   $key,
  $header 
)
static
Paramètres
string$key
string$header
Renvoie
string Returns a state.
Exceptions
Exception

Références $header, $key, $state, ParagonIE_Sodium_Core_HChaCha20\hChaCha20(), et ParagonIE_Sodium_Core_Util\substr().

Référencé par ParagonIE_Sodium_Compat\crypto_secretstream_xchacha20poly1305_init_pull().

◆ secretstream_xchacha20poly1305_init_push()

static secretstream_xchacha20poly1305_init_push (   $key)
static
Paramètres
string$key
Renvoie
array<int, string> Returns a state and a header.
Exceptions
Exception
SodiumException

Références $key, $state, ParagonIE_Sodium_Core_HChaCha20\hChaCha20(), et ParagonIE_Sodium_Core_Util\substr().

Référencé par ParagonIE_Sodium_Compat\crypto_secretstream_xchacha20poly1305_init_push().

◆ secretstream_xchacha20poly1305_rekey()

static secretstream_xchacha20poly1305_rekey ( $state)
static

◆ sign()

static sign (   $message,
  $sk 
)
static

Attached Ed25519 signature. (Returns a signed message.)

Références $message.

Référencé par ParagonIE_Sodium_Compat\crypto_sign().

◆ sign_detached()

static sign_detached (   $message,
  $sk 
)
static

Detached Ed25519 signature.

Références $message, et ParagonIE_Sodium_Core_Ed25519\sign_detached().

Référencé par ParagonIE_Sodium_Compat\crypto_sign_detached().

◆ sign_open()

static sign_open (   $signedMessage,
  $pk 
)
static

Opens a signed message. If valid, returns the message.

Référencé par ParagonIE_Sodium_Compat\crypto_sign_open().

◆ sign_verify_detached()

static sign_verify_detached (   $signature,
  $message,
  $pk 
)
static

Verify a detached signature of a given message and public key.

Références $message.

Référencé par ParagonIE_Sodium_Compat\crypto_sign_verify_detached().

Documentation des champs

◆ aead_chacha20poly1305_ABYTES

const aead_chacha20poly1305_ABYTES = 16

◆ aead_chacha20poly1305_IETF_ABYTES

const aead_chacha20poly1305_IETF_ABYTES = 16

◆ aead_chacha20poly1305_IETF_KEYBYTES

const aead_chacha20poly1305_IETF_KEYBYTES = 32

◆ aead_chacha20poly1305_IETF_NPUBBYTES

const aead_chacha20poly1305_IETF_NPUBBYTES = 12

◆ aead_chacha20poly1305_IETF_NSECBYTES

const aead_chacha20poly1305_IETF_NSECBYTES = 0

◆ aead_chacha20poly1305_KEYBYTES

const aead_chacha20poly1305_KEYBYTES = 32

◆ aead_chacha20poly1305_NPUBBYTES

const aead_chacha20poly1305_NPUBBYTES = 8

◆ aead_chacha20poly1305_NSECBYTES

const aead_chacha20poly1305_NSECBYTES = 0

◆ aead_xchacha20poly1305_IETF_ABYTES

const aead_xchacha20poly1305_IETF_ABYTES = 16

◆ aead_xchacha20poly1305_IETF_KEYBYTES

const aead_xchacha20poly1305_IETF_KEYBYTES = 32

◆ aead_xchacha20poly1305_IETF_NPUBBYTES

const aead_xchacha20poly1305_IETF_NPUBBYTES = 24

◆ aead_xchacha20poly1305_IETF_NSECBYTES

const aead_xchacha20poly1305_IETF_NSECBYTES = 0

◆ box_curve25519xsalsa20poly1305_BEFORENMBYTES

const box_curve25519xsalsa20poly1305_BEFORENMBYTES = 32

◆ box_curve25519xsalsa20poly1305_BOXZEROBYTES

const box_curve25519xsalsa20poly1305_BOXZEROBYTES = 16

◆ box_curve25519xsalsa20poly1305_MACBYTES

const box_curve25519xsalsa20poly1305_MACBYTES = 16

◆ box_curve25519xsalsa20poly1305_NONCEBYTES

const box_curve25519xsalsa20poly1305_NONCEBYTES = 24

◆ box_curve25519xsalsa20poly1305_PUBLICKEYBYTES

const box_curve25519xsalsa20poly1305_PUBLICKEYBYTES = 32

◆ box_curve25519xsalsa20poly1305_SECRETKEYBYTES

const box_curve25519xsalsa20poly1305_SECRETKEYBYTES = 32

◆ box_curve25519xsalsa20poly1305_SEEDBYTES

const box_curve25519xsalsa20poly1305_SEEDBYTES = 32

◆ box_curve25519xsalsa20poly1305_ZEROBYTES

const box_curve25519xsalsa20poly1305_ZEROBYTES = 32

◆ onetimeauth_poly1305_BYTES

const onetimeauth_poly1305_BYTES = 16

◆ onetimeauth_poly1305_KEYBYTES

const onetimeauth_poly1305_KEYBYTES = 32

◆ secretbox_xchacha20poly1305_BOXZEROBYTES

const secretbox_xchacha20poly1305_BOXZEROBYTES = 16

◆ secretbox_xchacha20poly1305_KEYBYTES

const secretbox_xchacha20poly1305_KEYBYTES = 32

◆ secretbox_xchacha20poly1305_MACBYTES

const secretbox_xchacha20poly1305_MACBYTES = 16

◆ secretbox_xchacha20poly1305_NONCEBYTES

const secretbox_xchacha20poly1305_NONCEBYTES = 24

◆ secretbox_xchacha20poly1305_ZEROBYTES

const secretbox_xchacha20poly1305_ZEROBYTES = 32

◆ secretbox_xsalsa20poly1305_BOXZEROBYTES

const secretbox_xsalsa20poly1305_BOXZEROBYTES = 16

◆ secretbox_xsalsa20poly1305_KEYBYTES

const secretbox_xsalsa20poly1305_KEYBYTES = 32

◆ secretbox_xsalsa20poly1305_MACBYTES

const secretbox_xsalsa20poly1305_MACBYTES = 16

◆ secretbox_xsalsa20poly1305_NONCEBYTES

const secretbox_xsalsa20poly1305_NONCEBYTES = 24

◆ secretbox_xsalsa20poly1305_ZEROBYTES

const secretbox_xsalsa20poly1305_ZEROBYTES = 32

◆ stream_salsa20_KEYBYTES

const stream_salsa20_KEYBYTES = 32

La documentation de cette classe a été générée à partir du fichier suivant :