Joomla CMS  3.8.5 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.8.5 et du framework Joomla Platform intégré
Référence de la classe ParagonIE_Sodium_Compat
+ Graphe d'héritage de ParagonIE_Sodium_Compat:

Fonctions membres publiques statiques

static bin2hex ($string)
 
static compare ($left, $right)
 
static crypto_aead_chacha20poly1305_decrypt ( $ciphertext='', $assocData='', $nonce='', $key='')
 
static crypto_aead_chacha20poly1305_encrypt ( $plaintext='', $assocData='', $nonce='', $key='')
 
static crypto_aead_chacha20poly1305_ietf_decrypt ( $ciphertext='', $assocData='', $nonce='', $key='')
 
static crypto_aead_chacha20poly1305_ietf_encrypt ( $plaintext='', $assocData='', $nonce='', $key='')
 
static crypto_aead_xchacha20poly1305_ietf_decrypt ( $ciphertext='', $assocData='', $nonce='', $key='')
 
static crypto_aead_xchacha20poly1305_ietf_encrypt ( $plaintext='', $assocData='', $nonce='', $key='')
 
static crypto_auth ($message, $key)
 
static crypto_auth_verify ($mac, $message, $key)
 
static crypto_box ($plaintext, $nonce, $keypair)
 
static crypto_box_seal ($plaintext, $publicKey)
 
static crypto_box_seal_open ($ciphertext, $keypair)
 
static crypto_box_keypair ()
 
static crypto_box_keypair_from_secretkey_and_publickey ($secretKey, $publicKey)
 
static crypto_box_open ($ciphertext, $nonce, $keypair)
 
static crypto_box_publickey ($keypair)
 
static crypto_box_publickey_from_secretkey ($secretKey)
 
static crypto_box_secretkey ($keypair)
 
static crypto_box_seed_keypair ($seed)
 
static crypto_generichash ($message, $key='', $length=self::CRYPTO_GENERICHASH_BYTES)
 
static crypto_generichash_final (&$ctx, $length=self::CRYPTO_GENERICHASH_BYTES)
 
static crypto_generichash_init ($key='', $length=self::CRYPTO_GENERICHASH_BYTES)
 
static crypto_generichash_update (&$ctx, $message)
 
static crypto_kx ($my_secret, $their_public, $client_public, $server_public)
 
static crypto_pwhash ($outlen, $passwd, $salt, $opslimit, $memlimit)
 
static crypto_pwhash_str ($passwd, $opslimit, $memlimit)
 
static crypto_pwhash_str_verify ($passwd, $hash)
 
static crypto_pwhash_scryptsalsa208sha256 ($outlen, $passwd, $salt, $opslimit, $memlimit)
 
static crypto_pwhash_scryptsalsa208sha256_str ($passwd, $opslimit, $memlimit)
 
static crypto_pwhash_scryptsalsa208sha256_str_verify ($passwd, $hash)
 
static crypto_scalarmult ($secretKey, $publicKey)
 
static crypto_scalarmult_base ($secretKey)
 
static crypto_secretbox ($plaintext, $nonce, $key)
 
static crypto_secretbox_open ($ciphertext, $nonce, $key)
 
static crypto_secretbox_xchacha20poly1305 ($plaintext, $nonce, $key)
 
static crypto_secretbox_xchacha20poly1305_open ($ciphertext, $nonce, $key)
 
static crypto_shorthash ($message, $key)
 
static crypto_stream ($len, $nonce, $key)
 
static crypto_stream_xor ($message, $nonce, $key)
 
static crypto_sign ($message, $secretKey)
 
static crypto_sign_open ($signedMessage, $publicKey)
 
static crypto_sign_keypair ()
 
static crypto_sign_seed_keypair ($seed)
 
static crypto_sign_publickey ($keypair)
 
static crypto_sign_publickey_from_secretkey ($secretKey)
 
static crypto_sign_secretkey ($keypair)
 
static crypto_sign_detached ($message, $secretKey)
 
static crypto_sign_verify_detached ($signature, $message, $publicKey)
 
static crypto_sign_ed25519_sk_to_curve25519 ($sk)
 
static hex2bin ($string)
 
static increment (&$var)
 
static library_version_major ()
 
static library_version_minor ()
 
static memcmp ($left, $right)
 
static memzero (&$var)
 
static randombytes_buf ($numBytes)
 
static randombytes_uniform ($range)
 
static randombytes_random16 ()
 
static version_string ()
 

Champs de données

const LIBRARY_VERSION_MAJOR = 9
 
const LIBRARY_VERSION_MINOR = 1
 
const VERSION_STRING = 'polyfill-1.0.8'
 
const CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES = 32
 
const CRYPTO_AEAD_CHACHA20POLY1305_NSECBYTES = 0
 
const CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES = 8
 
const CRYPTO_AEAD_CHACHA20POLY1305_ABYTES = 16
 
const CRYPTO_AEAD_CHACHA20POLY1305_IETF_KEYBYTES = 32
 
const CRYPTO_AEAD_CHACHA20POLY1305_IETF_NSECBYTES = 0
 
const CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES = 12
 
const CRYPTO_AEAD_CHACHA20POLY1305_IETF_ABYTES = 16
 
const CRYPTO_AEAD_XCHACHA20POLY1305_IETF_KEYBYTES = 32
 
const CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NSECBYTES = 0
 
const CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES = 24
 
const CRYPTO_AEAD_XCHACHA20POLY1305_IETF_ABYTES = 16
 
const CRYPTO_AUTH_BYTES = 32
 
const CRYPTO_AUTH_KEYBYTES = 32
 
const CRYPTO_BOX_SEALBYTES = 16
 
const CRYPTO_BOX_SECRETKEYBYTES = 32
 
const CRYPTO_BOX_PUBLICKEYBYTES = 32
 
const CRYPTO_BOX_KEYPAIRBYTES = 64
 
const CRYPTO_BOX_MACBYTES = 16
 
const CRYPTO_BOX_NONCEBYTES = 24
 
const CRYPTO_BOX_SEEDBYTES = 32
 
const CRYPTO_KX_BYTES = 32
 
const CRYPTO_KX_PUBLICKEYBYTES = 32
 
const CRYPTO_KX_SECRETKEYBYTES = 32
 
const CRYPTO_GENERICHASH_BYTES = 32
 
const CRYPTO_GENERICHASH_BYTES_MIN = 16
 
const CRYPTO_GENERICHASH_BYTES_MAX = 64
 
const CRYPTO_GENERICHASH_KEYBYTES = 32
 
const CRYPTO_GENERICHASH_KEYBYTES_MIN = 16
 
const CRYPTO_GENERICHASH_KEYBYTES_MAX = 64
 
const CRYPTO_PWHASH_SALTBYTES = 16
 
const CRYPTO_PWHASH_STRPREFIX = '$argon2i$'
 
const CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE = 33554432
 
const CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE = 4
 
const CRYPTO_PWHASH_MEMLIMIT_MODERATE = 134217728
 
const CRYPTO_PWHASH_OPSLIMIT_MODERATE = 6
 
const CRYPTO_PWHASH_MEMLIMIT_SENSITIVE = 536870912
 
const CRYPTO_PWHASH_OPSLIMIT_SENSITIVE = 8
 
const CRYPTO_PWHASH_SCRYPTSALSA208SHA256_SALTBYTES = 32
 
const CRYPTO_PWHASH_SCRYPTSALSA208SHA256_STRPREFIX = '$7$'
 
const CRYPTO_PWHASH_SCRYPTSALSA208SHA256_OPSLIMIT_INTERACTIVE = 534288
 
const CRYPTO_PWHASH_SCRYPTSALSA208SHA256_MEMLIMIT_INTERACTIVE = 16777216
 
const CRYPTO_PWHASH_SCRYPTSALSA208SHA256_OPSLIMIT_SENSITIVE = 33554432
 
const CRYPTO_PWHASH_SCRYPTSALSA208SHA256_MEMLIMIT_SENSITIVE = 1073741824
 
const CRYPTO_SCALARMULT_BYTES = 32
 
const CRYPTO_SCALARMULT_SCALARBYTES = 32
 
const CRYPTO_SHORTHASH_BYTES = 8
 
const CRYPTO_SHORTHASH_KEYBYTES = 16
 
const CRYPTO_SECRETBOX_KEYBYTES = 32
 
const CRYPTO_SECRETBOX_MACBYTES = 16
 
const CRYPTO_SECRETBOX_NONCEBYTES = 24
 
const CRYPTO_SIGN_BYTES = 64
 
const CRYPTO_SIGN_SEEDBYTES = 32
 
const CRYPTO_SIGN_PUBLICKEYBYTES = 32
 
const CRYPTO_SIGN_SECRETKEYBYTES = 64
 
const CRYPTO_SIGN_KEYPAIRBYTES = 96
 
const CRYPTO_STREAM_KEYBYTES = 32
 
const CRYPTO_STREAM_NONCEBYTES = 24
 

Attributs publics statiques

static $disableFallbackForUnitTests = false
 
static $fastMult = false
 

Fonctions membres protégées statiques

static use_fallback ($sodium_func_name='')
 
static isPhp72OrGreater ()
 

Description détaillée

Libsodium compatibility layer

This is the only class you should be interfacing with, as a user of sodium_compat.

If the PHP extension for libsodium is installed, it will always use that instead of our implementations. You get better performance and stronger guarantees against side-channels that way.

However, if your users don't have the PHP extension installed, we offer a compatible interface here. It will give you the correct results as if the PHP extension was installed. It won't be as fast, of course.

CAUTION * CAUTION * CAUTION * CAUTION * CAUTION * CAUTION * CAUTION * CAUTION *

  • Until audited, this is probably not safe to use! DANGER WILL ROBINSON *
  • CAUTION * CAUTION * CAUTION * CAUTION * CAUTION * CAUTION * CAUTION * CAUTION *

Documentation des fonctions membres

◆ bin2hex()

static bin2hex (   $string)
static

Cache-timing-safe implementation of bin2hex().

Paramètres
string$stringA string (probably raw binary)
Renvoie
string A hexadecimal-encoded string
Exceptions
TypeError

Références ParagonIE_Sodium_Core_Util\bin2hex(), et ParagonIE_Sodium_Core_Util\declareScalarType().

◆ compare()

static compare (   $left,
  $right 
)
static

Compare two strings, in constant-time. Compared to memcmp(), compare() is more useful for sorting.

Paramètres
string$leftThe left operand; must be a string
string$rightThe right operand; must be a string
Renvoie
int < 0 if the left operand is less than the right 0 if both strings are equal > 0 if the right operand is less than the left
Exceptions
TypeError

Références ParagonIE_Sodium_Core_Util\compare(), et ParagonIE_Sodium_Core_Util\declareScalarType().

◆ crypto_aead_chacha20poly1305_decrypt()

static crypto_aead_chacha20poly1305_decrypt (   $ciphertext = '',
  $assocData = '',
  $nonce = '',
  $key = '' 
)
static

Authenticated Encryption with Associated Data: Decryption

Algorithm: ChaCha20-Poly1305

This mode uses a 64-bit random nonce with a 64-bit counter. IETF mode uses a 96-bit random nonce with a 32-bit counter.

Paramètres
string$ciphertextEncrypted message (with Poly1305 MAC appended)
string$assocDataAuthenticated Associated Data (unencrypted)
string$nonceNumber to be used only Once; must be 8 bytes
string$keyEncryption key
Renvoie
string The original plaintext message
Exceptions
Error
TypeError

Références $key, Sodium\CRYPTO_AEAD_CHACHA20POLY1305_ABYTES, Sodium\CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES, Sodium\CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES, ParagonIE_Sodium_Core_Util\declareScalarType(), et ParagonIE_Sodium_Core_Util\strlen().

◆ crypto_aead_chacha20poly1305_encrypt()

static crypto_aead_chacha20poly1305_encrypt (   $plaintext = '',
  $assocData = '',
  $nonce = '',
  $key = '' 
)
static

Authenticated Encryption with Associated Data

Algorithm: ChaCha20-Poly1305

This mode uses a 64-bit random nonce with a 64-bit counter. IETF mode uses a 96-bit random nonce with a 32-bit counter.

Paramètres
string$plaintextMessage to be encrypted
string$assocDataAuthenticated Associated Data (unencrypted)
string$nonceNumber to be used only Once; must be 8 bytes
string$keyEncryption key
Renvoie
string Ciphertext with a 16-byte Poly1305 message authentication code appended
Exceptions
Error
TypeError

Références $key, Sodium\CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES, Sodium\CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES, ParagonIE_Sodium_Core_Util\declareScalarType(), et ParagonIE_Sodium_Core_Util\strlen().

◆ crypto_aead_chacha20poly1305_ietf_decrypt()

static crypto_aead_chacha20poly1305_ietf_decrypt (   $ciphertext = '',
  $assocData = '',
  $nonce = '',
  $key = '' 
)
static

Authenticated Encryption with Associated Data: Decryption

Algorithm: ChaCha20-Poly1305

IETF mode uses a 96-bit random nonce with a 32-bit counter. Regular mode uses a 64-bit random nonce with a 64-bit counter.

Paramètres
string$ciphertextEncrypted message (with Poly1305 MAC appended)
string$assocDataAuthenticated Associated Data (unencrypted)
string$nonceNumber to be used only Once; must be 12 bytes
string$keyEncryption key
Renvoie
string The original plaintext message
Exceptions
Error
TypeError

Références $key, Sodium\CRYPTO_AEAD_CHACHA20POLY1305_ABYTES, Sodium\CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES, Sodium\CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES, ParagonIE_Sodium_Core_Util\declareScalarType(), et ParagonIE_Sodium_Core_Util\strlen().

◆ crypto_aead_chacha20poly1305_ietf_encrypt()

static crypto_aead_chacha20poly1305_ietf_encrypt (   $plaintext = '',
  $assocData = '',
  $nonce = '',
  $key = '' 
)
static

Authenticated Encryption with Associated Data

Algorithm: ChaCha20-Poly1305

IETF mode uses a 96-bit random nonce with a 32-bit counter. Regular mode uses a 64-bit random nonce with a 64-bit counter.

Paramètres
string$plaintextMessage to be encrypted
string$assocDataAuthenticated Associated Data (unencrypted)
string$nonceNumber to be used only Once; must be 8 bytes
string$keyEncryption key
Renvoie
string Ciphertext with a 16-byte Poly1305 message authentication code appended
Exceptions
Error
TypeError

Références $key, Sodium\CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES, Sodium\CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES, ParagonIE_Sodium_Core_Util\declareScalarType(), et ParagonIE_Sodium_Core_Util\strlen().

◆ crypto_aead_xchacha20poly1305_ietf_decrypt()

static crypto_aead_xchacha20poly1305_ietf_decrypt (   $ciphertext = '',
  $assocData = '',
  $nonce = '',
  $key = '' 
)
static

Authenticated Encryption with Associated Data: Decryption

Algorithm: XChaCha20-Poly1305

This mode uses a 64-bit random nonce with a 64-bit counter. IETF mode uses a 96-bit random nonce with a 32-bit counter.

Paramètres
string$ciphertextEncrypted message (with Poly1305 MAC appended)
string$assocDataAuthenticated Associated Data (unencrypted)
string$nonceNumber to be used only Once; must be 8 bytes
string$keyEncryption key
Renvoie
string The original plaintext message
Exceptions
Error
TypeError

Références $key, ParagonIE_Sodium_Crypto\aead_xchacha20poly1305_ietf_decrypt(), ParagonIE_Sodium_Crypto32\aead_xchacha20poly1305_ietf_decrypt(), ParagonIE_Sodium_Core_Util\declareScalarType(), et ParagonIE_Sodium_Core_Util\strlen().

◆ crypto_aead_xchacha20poly1305_ietf_encrypt()

static crypto_aead_xchacha20poly1305_ietf_encrypt (   $plaintext = '',
  $assocData = '',
  $nonce = '',
  $key = '' 
)
static

Authenticated Encryption with Associated Data

Algorithm: XChaCha20-Poly1305

This mode uses a 64-bit random nonce with a 64-bit counter. IETF mode uses a 96-bit random nonce with a 32-bit counter.

Paramètres
string$plaintextMessage to be encrypted
string$assocDataAuthenticated Associated Data (unencrypted)
string$nonceNumber to be used only Once; must be 8 bytes
string$keyEncryption key
Renvoie
string Ciphertext with a 16-byte Poly1305 message authentication code appended
Exceptions
Error
TypeError

Références $key, ParagonIE_Sodium_Crypto\aead_xchacha20poly1305_ietf_encrypt(), ParagonIE_Sodium_Crypto32\aead_xchacha20poly1305_ietf_encrypt(), ParagonIE_Sodium_Core_Util\declareScalarType(), et ParagonIE_Sodium_Core_Util\strlen().

◆ crypto_auth()

static crypto_auth (   $message,
  $key 
)
static

Authenticate a message. Uses symmetric-key cryptography.

Algorithm: HMAC-SHA512-256. Which is HMAC-SHA-512 truncated to 256 bits. Not to be confused with HMAC-SHA-512/256 which would use the SHA-512/256 hash function (uses different initial parameters but still truncates to 256 bits to sidestep length-extension attacks).

Paramètres
string$messageMessage to be authenticated
string$keySymmetric authentication key
Renvoie
string Message authentication code
Exceptions
Error
TypeError

Références $key, $message, ParagonIE_Sodium_Crypto32\auth(), ParagonIE_Sodium_Crypto\auth(), Sodium\CRYPTO_AUTH_KEYBYTES, ParagonIE_Sodium_Core_Util\declareScalarType(), et ParagonIE_Sodium_Core_Util\strlen().

◆ crypto_auth_verify()

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

Verify the MAC of a message previously authenticated with crypto_auth.

Paramètres
string$macMessage authentication code
string$messageMessage whose authenticity you are attempting to verify (with a given MAC and key)
string$keySymmetric authentication key
Renvoie
bool TRUE if authenticated, FALSE otherwise
Exceptions
Error
TypeError

Références $key, $message, ParagonIE_Sodium_Crypto\auth_verify(), ParagonIE_Sodium_Crypto32\auth_verify(), Sodium\CRYPTO_AUTH_BYTES, Sodium\CRYPTO_AUTH_KEYBYTES, ParagonIE_Sodium_Core_Util\declareScalarType(), et ParagonIE_Sodium_Core_Util\strlen().

◆ crypto_box()

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

Authenticated asymmetric-key encryption. Both the sender and recipient may decrypt messages.

Algorithm: X25519-XSalsa20-Poly1305. X25519: Elliptic-Curve Diffie Hellman over Curve25519. XSalsa20: Extended-nonce variant of salsa20. Poyl1305: Polynomial MAC for one-time message authentication.

Paramètres
string$plaintextThe message to be encrypted
string$nonceA Number to only be used Once; must be 24 bytes
string$keypairYour secret key and your recipient's public key
Renvoie
string Ciphertext with 16-byte Poly1305 MAC
Exceptions
Error
TypeError

Références ParagonIE_Sodium_Crypto32\box(), ParagonIE_Sodium_Crypto\box(), Sodium\CRYPTO_BOX_KEYPAIRBYTES, Sodium\CRYPTO_BOX_NONCEBYTES, ParagonIE_Sodium_Core_Util\declareScalarType(), et ParagonIE_Sodium_Core_Util\strlen().

Référencé par SodiumCipher\encrypt().

◆ crypto_box_keypair()

static crypto_box_keypair ( )
static

Generate a new random X25519 keypair.

Renvoie
string A 64-byte string; the first 32 are your secret key, while the last 32 are your public key. crypto_box_secretkey() and crypto_box_publickey() exist to separate them so you don't accidentally get them mixed up!

Références ParagonIE_Sodium_Crypto\box_keypair().

Référencé par SodiumCipher\generateKey().

◆ crypto_box_keypair_from_secretkey_and_publickey()

static crypto_box_keypair_from_secretkey_and_publickey (   $secretKey,
  $publicKey 
)
static

Combine two keys into a keypair for use in library methods that expect a keypair. This doesn't necessarily have to be the same person's keys.

Paramètres
string$secretKeySecret key
string$publicKeyPublic key
Renvoie
string Keypair
Exceptions
Error
TypeError

Références ParagonIE_Sodium_Crypto32\box_keypair_from_secretkey_and_publickey(), ParagonIE_Sodium_Crypto\box_keypair_from_secretkey_and_publickey(), Sodium\CRYPTO_BOX_PUBLICKEYBYTES, Sodium\CRYPTO_BOX_SECRETKEYBYTES, ParagonIE_Sodium_Core_Util\declareScalarType(), et ParagonIE_Sodium_Core_Util\strlen().

Référencé par SodiumCipher\decrypt(), et SodiumCipher\encrypt().

◆ crypto_box_open()

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

Decrypt a message previously encrypted with crypto_box().

Paramètres
string$ciphertextEncrypted message
string$nonceNumber to only be used Once; must be 24 bytes
string$keypairYour secret key and the sender's public key
Renvoie
string The original plaintext message
Exceptions
Error
TypeError

Références ParagonIE_Sodium_Crypto32\box_open(), ParagonIE_Sodium_Crypto\box_open(), Sodium\CRYPTO_BOX_KEYPAIRBYTES, Sodium\CRYPTO_BOX_MACBYTES, Sodium\CRYPTO_BOX_NONCEBYTES, ParagonIE_Sodium_Core_Util\declareScalarType(), et ParagonIE_Sodium_Core_Util\strlen().

Référencé par SodiumCipher\decrypt().

◆ crypto_box_publickey()

static crypto_box_publickey (   $keypair)
static

Extract the public key from a crypto_box keypair.

Paramètres
string$keypair
Renvoie
string Your crypto_box public key
Exceptions
Error
TypeError

Références ParagonIE_Sodium_Crypto32\box_publickey(), ParagonIE_Sodium_Crypto\box_publickey(), Sodium\CRYPTO_BOX_KEYPAIRBYTES, ParagonIE_Sodium_Core_Util\declareScalarType(), et ParagonIE_Sodium_Core_Util\strlen().

Référencé par SodiumCipher\generateKey().

◆ crypto_box_publickey_from_secretkey()

static crypto_box_publickey_from_secretkey (   $secretKey)
static

Calculate the X25519 public key from a given X25519 secret key.

Paramètres
string$secretKeyAny X25519 secret key
Renvoie
string The corresponding X25519 public key
Exceptions
Error
TypeError

Références ParagonIE_Sodium_Crypto32\box_publickey_from_secretkey(), ParagonIE_Sodium_Crypto\box_publickey_from_secretkey(), Sodium\CRYPTO_BOX_SECRETKEYBYTES, ParagonIE_Sodium_Core_Util\declareScalarType(), et ParagonIE_Sodium_Core_Util\strlen().

◆ crypto_box_seal()

static crypto_box_seal (   $plaintext,
  $publicKey 
)
static

Anonymous public-key encryption. Only the recipient may decrypt messages.

Algorithm: X25519-XSalsa20-Poly1305, as with crypto_box. The sender's X25519 keypair is ephemeral. Nonce is generated from the BLAKE2b hash of both public keys.

This provides ciphertext integrity.

Paramètres
string$plaintextMessage to be sealed
string$publicKeyYour recipient's public key
Renvoie
string Sealed message that only your recipient can decrypt
Exceptions
Error
TypeError

Références Sodium\CRYPTO_BOX_PUBLICKEYBYTES, ParagonIE_Sodium_Core_Util\declareScalarType(), et ParagonIE_Sodium_Core_Util\strlen().

◆ crypto_box_seal_open()

static crypto_box_seal_open (   $ciphertext,
  $keypair 
)
static

Opens a message encrypted with crypto_box_seal(). Requires the recipient's keypair (sk || pk) to decrypt successfully.

This validates ciphertext integrity.

Paramètres
string$ciphertextSealed message to be opened
string$keypairYour crypto_box keypair
Renvoie
string The original plaintext message
Exceptions
Error
TypeError

Références Sodium\CRYPTO_BOX_KEYPAIRBYTES, ParagonIE_Sodium_Core_Util\declareScalarType(), et ParagonIE_Sodium_Core_Util\strlen().

◆ crypto_box_secretkey()

static crypto_box_secretkey (   $keypair)
static

Extract the secret key from a crypto_box keypair.

Paramètres
string$keypair
Renvoie
string Your crypto_box secret key
Exceptions
Error
TypeError

Références ParagonIE_Sodium_Crypto32\box_secretkey(), ParagonIE_Sodium_Crypto\box_secretkey(), Sodium\CRYPTO_BOX_KEYPAIRBYTES, ParagonIE_Sodium_Core_Util\declareScalarType(), et ParagonIE_Sodium_Core_Util\strlen().

Référencé par SodiumCipher\generateKey().

◆ crypto_box_seed_keypair()

static crypto_box_seed_keypair (   $seed)
static

Generate an X25519 keypair from a seed.

Paramètres
string$seed
Renvoie
string

Références ParagonIE_Sodium_Crypto\box_seed_keypair(), et ParagonIE_Sodium_Core_Util\declareScalarType().

◆ crypto_generichash()

static crypto_generichash (   $message,
  $key = '',
  $length = self::CRYPTO_GENERICHASH_BYTES 
)
static

Calculates a BLAKE2b hash, with an optional key.

Paramètres
string$messageThe message to be hashed
string$keyIf specified, must be a string between 16 and 64 bytes long
int$lengthOutput length in bytes; must be between 16 and 64 (default = 32)
Renvoie
string Raw binary
Exceptions
Error
TypeError

Références $key, $message, Sodium\CRYPTO_GENERICHASH_KEYBYTES_MAX, Sodium\CRYPTO_GENERICHASH_KEYBYTES_MIN, ParagonIE_Sodium_Core_Util\declareScalarType(), et ParagonIE_Sodium_Core_Util\strlen().

◆ crypto_generichash_final()

static crypto_generichash_final ( $ctx,
  $length = self::CRYPTO_GENERICHASH_BYTES 
)
static

Get the final BLAKE2b hash output for a given context.

Paramètres
string&$ctxBLAKE2 hashing context. Generated by crypto_generichash_init().
int$lengthHash output size.
Renvoie
string Final BLAKE2b hash.
Exceptions
Error
TypeError

Références ParagonIE_Sodium_Core_Util\declareScalarType().

◆ crypto_generichash_init()

static crypto_generichash_init (   $key = '',
  $length = self::CRYPTO_GENERICHASH_BYTES 
)
static

Initialize a BLAKE2b hashing context, for use in a streaming interface.

Paramètres
string$keyIf specified must be a string between 16 and 64 bytes
int$lengthThe size of the desired hash output
Renvoie
string A BLAKE2 hashing context, encoded as a string (To be 100% compatible with ext/libsodium)
Exceptions
Error
TypeError

Références $key, Sodium\CRYPTO_GENERICHASH_KEYBYTES_MAX, Sodium\CRYPTO_GENERICHASH_KEYBYTES_MIN, ParagonIE_Sodium_Core_Util\declareScalarType(), et ParagonIE_Sodium_Core_Util\strlen().

◆ crypto_generichash_update()

static crypto_generichash_update ( $ctx,
  $message 
)
static

Update a BLAKE2b hashing context with additional data.

Paramètres
string&$ctxBLAKE2 hashing context. Generated by crypto_generichash_init(). $ctx is passed by reference and gets updated in-place.
string$messageThe message to append to the existing hash state.
Renvoie
void
Exceptions
TypeError

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

◆ crypto_kx()

static crypto_kx (   $my_secret,
  $their_public,
  $client_public,
  $server_public 
)
static

Perform a key exchange, between a designated client and a server.

Typically, you would designate one machine to be the client and the other to be the server. The first two keys are what you'd expect for scalarmult() below, but the latter two public keys don't swap places.

| ALICE | BOB |

Client Server
shared = crypto_kx( shared = crypto_kx(

| alice_sk, | bob_sk, | <- contextual | bob_pk, | alice_pk, | <- contextual | alice_pk, | alice_pk, | <--— static | bob_pk | bob_pk | <--— static | ) | ) |

They are used along with the scalarmult product to generate a 256-bit BLAKE2b hash unique to the client and server keys.

Paramètres
string$my_secret
string$their_public
string$client_public
string$server_public
Renvoie
string
Exceptions
Error
TypeError

Références Sodium\CRYPTO_BOX_PUBLICKEYBYTES, Sodium\CRYPTO_BOX_SECRETKEYBYTES, ParagonIE_Sodium_Core_Util\declareScalarType(), ParagonIE_Sodium_Crypto32\keyExchange(), ParagonIE_Sodium_Crypto\keyExchange(), et ParagonIE_Sodium_Core_Util\strlen().

◆ crypto_pwhash()

static crypto_pwhash (   $outlen,
  $passwd,
  $salt,
  $opslimit,
  $memlimit 
)
static
Paramètres
int$outlen
string$passwd
string$salt
int$opslimit
int$memlimit
Renvoie
string
Exceptions
Error

Références ParagonIE_Sodium_Core_Util\declareScalarType().

◆ crypto_pwhash_scryptsalsa208sha256()

static crypto_pwhash_scryptsalsa208sha256 (   $outlen,
  $passwd,
  $salt,
  $opslimit,
  $memlimit 
)
static
Paramètres
int$outlen
string$passwd
string$salt
int$opslimit
int$memlimit
Renvoie
string
Exceptions
Error

Références ParagonIE_Sodium_Core_Util\declareScalarType().

◆ crypto_pwhash_scryptsalsa208sha256_str()

static crypto_pwhash_scryptsalsa208sha256_str (   $passwd,
  $opslimit,
  $memlimit 
)
static
Paramètres
string$passwd
int$opslimit
int$memlimit
Renvoie
string
Exceptions
Error

Références ParagonIE_Sodium_Core_Util\declareScalarType().

◆ crypto_pwhash_scryptsalsa208sha256_str_verify()

static crypto_pwhash_scryptsalsa208sha256_str_verify (   $passwd,
  $hash 
)
static
Paramètres
string$passwd
string$hash
Renvoie
bool
Exceptions
Error

Références $hash, et ParagonIE_Sodium_Core_Util\declareScalarType().

◆ crypto_pwhash_str()

static crypto_pwhash_str (   $passwd,
  $opslimit,
  $memlimit 
)
static
Paramètres
string$passwd
int$opslimit
int$memlimit
Renvoie
string
Exceptions
Error

Références ParagonIE_Sodium_Core_Util\declareScalarType().

◆ crypto_pwhash_str_verify()

static crypto_pwhash_str_verify (   $passwd,
  $hash 
)
static
Paramètres
string$passwd
string$hash
Renvoie
bool
Exceptions
Error

Références $hash, et ParagonIE_Sodium_Core_Util\declareScalarType().

◆ crypto_scalarmult()

static crypto_scalarmult (   $secretKey,
  $publicKey 
)
static

Calculate the shared secret between your secret key and your recipient's public key.

Algorithm: X25519 (ECDH over Curve25519)

Paramètres
string$secretKey
string$publicKey
Renvoie
string
Exceptions
Error
TypeError

Références Sodium\CRYPTO_BOX_PUBLICKEYBYTES, Sodium\CRYPTO_BOX_SECRETKEYBYTES, ParagonIE_Sodium_Core_Util\declareScalarType(), ParagonIE_Sodium_Core_Util\hashEquals(), ParagonIE_Sodium_Crypto32\scalarmult(), ParagonIE_Sodium_Crypto\scalarmult(), et ParagonIE_Sodium_Core_Util\strlen().

◆ crypto_scalarmult_base()

static crypto_scalarmult_base (   $secretKey)
static

◆ crypto_secretbox()

static crypto_secretbox (   $plaintext,
  $nonce,
  $key 
)
static

Authenticated symmetric-key encryption.

Algorithm: XSalsa20-Poly1305

Paramètres
string$plaintextThe message you're encrypting
string$nonceA Number to be used Once; must be 24 bytes
string$keySymmetric encryption key
Renvoie
string Ciphertext with Poly1305 MAC
Exceptions
Error
TypeError

Références $key, Sodium\CRYPTO_SECRETBOX_KEYBYTES, Sodium\CRYPTO_SECRETBOX_NONCEBYTES, ParagonIE_Sodium_Core_Util\declareScalarType(), et ParagonIE_Sodium_Core_Util\strlen().

◆ crypto_secretbox_open()

static crypto_secretbox_open (   $ciphertext,
  $nonce,
  $key 
)
static

Decrypts a message previously encrypted with crypto_secretbox().

Paramètres
string$ciphertextCiphertext with Poly1305 MAC
string$nonceA Number to be used Once; must be 24 bytes
string$keySymmetric encryption key
Renvoie
string Original plaintext message
Exceptions
Error
TypeError

Références $key, Sodium\CRYPTO_SECRETBOX_KEYBYTES, Sodium\CRYPTO_SECRETBOX_NONCEBYTES, ParagonIE_Sodium_Core_Util\declareScalarType(), et ParagonIE_Sodium_Core_Util\strlen().

◆ crypto_secretbox_xchacha20poly1305()

static crypto_secretbox_xchacha20poly1305 (   $plaintext,
  $nonce,
  $key 
)
static

Authenticated symmetric-key encryption.

Algorithm: XChaCha20-Poly1305

Paramètres
string$plaintextThe message you're encrypting
string$nonceA Number to be used Once; must be 24 bytes
string$keySymmetric encryption key
Renvoie
string Ciphertext with Poly1305 MAC
Exceptions
Error
TypeError

Références $key, Sodium\CRYPTO_SECRETBOX_KEYBYTES, Sodium\CRYPTO_SECRETBOX_NONCEBYTES, ParagonIE_Sodium_Core_Util\declareScalarType(), et ParagonIE_Sodium_Core_Util\strlen().

◆ crypto_secretbox_xchacha20poly1305_open()

static crypto_secretbox_xchacha20poly1305_open (   $ciphertext,
  $nonce,
  $key 
)
static

Decrypts a message previously encrypted with crypto_secretbox_xchacha20poly1305().

Paramètres
string$ciphertextCiphertext with Poly1305 MAC
string$nonceA Number to be used Once; must be 24 bytes
string$keySymmetric encryption key
Renvoie
string Original plaintext message
Exceptions
Error
TypeError

Références $key, Sodium\CRYPTO_SECRETBOX_KEYBYTES, Sodium\CRYPTO_SECRETBOX_NONCEBYTES, ParagonIE_Sodium_Core_Util\declareScalarType(), et ParagonIE_Sodium_Core_Util\strlen().

◆ crypto_shorthash()

static crypto_shorthash (   $message,
  $key 
)
static

Calculates a SipHash-2-4 hash of a message for a given key.

Paramètres
string$messageInput message
string$keySipHash-2-4 key
Renvoie
string Hash
Exceptions
Error
TypeError

Références $key, $message, Sodium\CRYPTO_SHORTHASH_KEYBYTES, ParagonIE_Sodium_Core_Util\declareScalarType(), ParagonIE_Sodium_Core32_SipHash\sipHash24(), ParagonIE_Sodium_Core_SipHash\sipHash24(), et ParagonIE_Sodium_Core_Util\strlen().

◆ crypto_sign()

static crypto_sign (   $message,
  $secretKey 
)
static

Returns a signed message. You probably want crypto_sign_detached() instead, which only returns the signature.

Algorithm: Ed25519 (EdDSA over Curve25519)

Paramètres
string$messageMessage to be signed.
string$secretKeySecret signing key.
Renvoie
string Signed message (signature is prefixed).
Exceptions
Error
TypeError

Références $message, Sodium\CRYPTO_SIGN_SECRETKEYBYTES, ParagonIE_Sodium_Core_Util\declareScalarType(), ParagonIE_Sodium_Crypto32\sign(), ParagonIE_Sodium_Crypto\sign(), et ParagonIE_Sodium_Core_Util\strlen().

◆ crypto_sign_detached()

static crypto_sign_detached (   $message,
  $secretKey 
)
static

Calculate the Ed25519 signature of a message and return ONLY the signature.

Algorithm: Ed25519 (EdDSA over Curve25519)

Paramètres
string$messageMessage to be signed
string$secretKeySecret signing key
Renvoie
string Digital signature
Exceptions
Error
TypeError

Références $message, Sodium\CRYPTO_SIGN_SECRETKEYBYTES, ParagonIE_Sodium_Core_Util\declareScalarType(), ParagonIE_Sodium_Crypto32\sign_detached(), ParagonIE_Sodium_Crypto\sign_detached(), et ParagonIE_Sodium_Core_Util\strlen().

◆ crypto_sign_ed25519_sk_to_curve25519()

static crypto_sign_ed25519_sk_to_curve25519 (   $sk)
static

◆ crypto_sign_keypair()

static crypto_sign_keypair ( )
static

Generate a new random Ed25519 keypair.

Renvoie
string

Références ParagonIE_Sodium_Core32_Ed25519\keypair(), et ParagonIE_Sodium_Core_Ed25519\keypair().

◆ crypto_sign_open()

static crypto_sign_open (   $signedMessage,
  $publicKey 
)
static

Validates a signed message then returns the message.

Paramètres
string$signedMessageA signed message
string$publicKeyA public key
Renvoie
string The original message (if the signature is valid for this public key)
Exceptions
Error
TypeError

Références Sodium\CRYPTO_SIGN_BYTES, Sodium\CRYPTO_SIGN_PUBLICKEYBYTES, ParagonIE_Sodium_Core_Util\declareScalarType(), ParagonIE_Sodium_Crypto32\sign_open(), ParagonIE_Sodium_Crypto\sign_open(), et ParagonIE_Sodium_Core_Util\strlen().

◆ crypto_sign_publickey()

static crypto_sign_publickey (   $keypair)
static

Extract an Ed25519 public key from an Ed25519 keypair.

Paramètres
string$keypairKeypair
Renvoie
string Public key
Exceptions
Error
TypeError

Références Sodium\CRYPTO_SIGN_KEYPAIRBYTES, ParagonIE_Sodium_Core_Util\declareScalarType(), ParagonIE_Sodium_Core32_Ed25519\publickey(), ParagonIE_Sodium_Core_Ed25519\publickey(), et ParagonIE_Sodium_Core_Util\strlen().

◆ crypto_sign_publickey_from_secretkey()

static crypto_sign_publickey_from_secretkey (   $secretKey)
static

Calculate an Ed25519 public key from an Ed25519 secret key.

Paramètres
string$secretKeyYour Ed25519 secret key
Renvoie
string The corresponding Ed25519 public key
Exceptions
Error
TypeError

Références Sodium\CRYPTO_SIGN_SECRETKEYBYTES, ParagonIE_Sodium_Core_Util\declareScalarType(), et ParagonIE_Sodium_Core_Util\strlen().

◆ crypto_sign_secretkey()

static crypto_sign_secretkey (   $keypair)
static

Extract an Ed25519 secret key from an Ed25519 keypair.

Paramètres
string$keypairKeypair
Renvoie
string Secret key
Exceptions
Error
TypeError

Références Sodium\CRYPTO_SIGN_KEYPAIRBYTES, ParagonIE_Sodium_Core_Util\declareScalarType(), ParagonIE_Sodium_Core32_Ed25519\secretkey(), ParagonIE_Sodium_Core_Ed25519\secretkey(), et ParagonIE_Sodium_Core_Util\strlen().

◆ crypto_sign_seed_keypair()

static crypto_sign_seed_keypair (   $seed)
static

Generate an Ed25519 keypair from a seed.

Paramètres
string$seedInput seed
Renvoie
string Keypair

Références ParagonIE_Sodium_Core_Util\declareScalarType().

◆ crypto_sign_verify_detached()

static crypto_sign_verify_detached (   $signature,
  $message,
  $publicKey 
)
static

Verify the Ed25519 signature of a message.

Paramètres
string$signatureDigital sginature
string$messageMessage to be verified
string$publicKeyPublic key
Renvoie
bool TRUE if this signature is good for this public key; FALSE otherwise
Exceptions
Error
TypeError

Références $message, Sodium\CRYPTO_SIGN_BYTES, Sodium\CRYPTO_SIGN_PUBLICKEYBYTES, ParagonIE_Sodium_Core_Util\declareScalarType(), ParagonIE_Sodium_Crypto32\sign_verify_detached(), ParagonIE_Sodium_Crypto\sign_verify_detached(), et ParagonIE_Sodium_Core_Util\strlen().

◆ crypto_stream()

static crypto_stream (   $len,
  $nonce,
  $key 
)
static

Expand a key and nonce into a keystream of pseudorandom bytes.

Paramètres
int$lenNumber of bytes desired
string$nonceNumber to be used Once; must be 24 bytes
string$keyXSalsa20 key
Renvoie
string Pseudorandom stream that can be XORed with messages to provide encryption (but not authentication; see Poly1305 or crypto_auth() for that, which is not optional for security)
Exceptions
Error
TypeError

Références $key, Sodium\CRYPTO_STREAM_KEYBYTES, Sodium\CRYPTO_STREAM_NONCEBYTES, ParagonIE_Sodium_Core_Util\declareScalarType(), ParagonIE_Sodium_Core_Util\strlen(), ParagonIE_Sodium_Core32_XSalsa20\xsalsa20(), et ParagonIE_Sodium_Core_XSalsa20\xsalsa20().

◆ crypto_stream_xor()

static crypto_stream_xor (   $message,
  $nonce,
  $key 
)
static

DANGER! UNAUTHENTICATED ENCRYPTION!

Unless you are following expert advice, do not used this feature.

Algorithm: XSalsa20

This DOES NOT provide ciphertext integrity.

Paramètres
string$messagePlaintext message
string$nonceNumber to be used Once; must be 24 bytes
string$keyEncryption key
Renvoie
string Encrypted text which is vulnerable to chosen- ciphertext attacks unless you implement some other mitigation to the ciphertext (i.e. Encrypt then MAC)
Exceptions
Error
TypeError

Références $key, $message, Sodium\CRYPTO_STREAM_KEYBYTES, Sodium\CRYPTO_STREAM_NONCEBYTES, ParagonIE_Sodium_Core_Util\declareScalarType(), ParagonIE_Sodium_Core_Util\strlen(), ParagonIE_Sodium_Core32_XSalsa20\xsalsa20_xor(), et ParagonIE_Sodium_Core_XSalsa20\xsalsa20_xor().

◆ hex2bin()

static hex2bin (   $string)
static

Cache-timing-safe implementation of hex2bin().

Paramètres
string$stringHexadecimal string
Renvoie
string Raw binary string
Exceptions
TypeError

Références ParagonIE_Sodium_Core_Util\declareScalarType(), et ParagonIE_Sodium_Core_Util\hex2bin().

◆ increment()

static increment ( $var)
static

Increase a string (little endian)

Paramètres
string$var
Renvoie
void
Exceptions
Error(Unless libsodium is installed)

Références $i, ParagonIE_Sodium_Core_Util\chrToInt(), ParagonIE_Sodium_Core_Util\declareScalarType(), ParagonIE_Sodium_Core_Util\intToChr(), ParagonIE_Sodium_Core_Util\strlen(), et ParagonIE_Sodium_Core_Util\substr().

◆ isPhp72OrGreater()

static isPhp72OrGreater ( )
staticprotected

Libsodium as implemented in PHP 7.2

https://wiki.php.net/rfc/libsodium

Renvoie
bool

Références null.

◆ library_version_major()

static library_version_major ( )
static

The equivalent to the libsodium minor version we aim to be compatible with (sans pwhash and memzero).

Renvoie
int

◆ library_version_minor()

static library_version_minor ( )
static

The equivalent to the libsodium minor version we aim to be compatible with (sans pwhash and memzero).

Renvoie
int

◆ memcmp()

static memcmp (   $left,
  $right 
)
static

Compare two strings.

Paramètres
string$left
string$right
Renvoie
int
Exceptions
TypeError

Références ParagonIE_Sodium_Core_Util\declareScalarType(), et ParagonIE_Sodium_Core_Util\memcmp().

◆ memzero()

static memzero ( $var)
static

It's actually not possible to zero memory buffers in PHP. You need the native library for that.

Paramètres
string | null$var
Renvoie
void
Exceptions
Error(Unless libsodium is installed)

Références ParagonIE_Sodium_Core_Util\declareScalarType().

Référencé par ParagonIE_Sodium_Core_Salsa20\salsa20(), ParagonIE_Sodium_Core32_Salsa20\salsa20(), ParagonIE_Sodium_Core_Salsa20\salsa20_xor_ic(), ParagonIE_Sodium_Core32_Salsa20\salsa20_xor_ic(), ParagonIE_Sodium_Core32_Ed25519\sign_detached(), et ParagonIE_Sodium_Core_Ed25519\sign_detached().

◆ randombytes_buf()

static randombytes_buf (   $numBytes)
static

Generate a string of bytes from the kernel's CSPRNG. Proudly uses /dev/urandom (if getrandom(2) is not available).

Paramètres
int$numBytes
Renvoie
string
Exceptions
TypeError

◆ randombytes_random16()

static randombytes_random16 ( )
static

Generate a random 16-bit integer.

Renvoie
int

◆ randombytes_uniform()

static randombytes_uniform (   $range)
static

Generate an integer between 0 and $range (non-inclusive).

Paramètres
int$range
Renvoie
int
Exceptions
TypeError

Références $range.

◆ use_fallback()

static use_fallback (   $sodium_func_name = '')
staticprotected

Should we use the libsodium core function instead? This is always a good idea, if it's available. (Unless we're in the middle of running our unit test suite.)

If ext/libsodium is available, use it. Return TRUE. Otherwise, we have to use the code provided herein. Return FALSE.

Paramètres
string$sodium_func_name
Renvoie
bool

Références null.

◆ version_string()

static version_string ( )
static

This emulates libsodium's version_string() function, except ours is prefixed with 'polyfill-'.

Renvoie
string

Documentation des champs

◆ $disableFallbackForUnitTests

$disableFallbackForUnitTests = false
static

◆ $fastMult

$fastMult = false
static

◆ CRYPTO_AEAD_CHACHA20POLY1305_ABYTES

const CRYPTO_AEAD_CHACHA20POLY1305_ABYTES = 16

◆ CRYPTO_AEAD_CHACHA20POLY1305_IETF_ABYTES

const CRYPTO_AEAD_CHACHA20POLY1305_IETF_ABYTES = 16

◆ CRYPTO_AEAD_CHACHA20POLY1305_IETF_KEYBYTES

const CRYPTO_AEAD_CHACHA20POLY1305_IETF_KEYBYTES = 32

◆ CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES

const CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES = 12

◆ CRYPTO_AEAD_CHACHA20POLY1305_IETF_NSECBYTES

const CRYPTO_AEAD_CHACHA20POLY1305_IETF_NSECBYTES = 0

◆ CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES

const CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES = 32

◆ CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES

const CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES = 8

◆ CRYPTO_AEAD_CHACHA20POLY1305_NSECBYTES

const CRYPTO_AEAD_CHACHA20POLY1305_NSECBYTES = 0

◆ CRYPTO_AEAD_XCHACHA20POLY1305_IETF_ABYTES

const CRYPTO_AEAD_XCHACHA20POLY1305_IETF_ABYTES = 16

◆ CRYPTO_AEAD_XCHACHA20POLY1305_IETF_KEYBYTES

const CRYPTO_AEAD_XCHACHA20POLY1305_IETF_KEYBYTES = 32

◆ CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES

const CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES = 24

◆ CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NSECBYTES

const CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NSECBYTES = 0

◆ CRYPTO_AUTH_BYTES

const CRYPTO_AUTH_BYTES = 32

◆ CRYPTO_AUTH_KEYBYTES

const CRYPTO_AUTH_KEYBYTES = 32

◆ CRYPTO_BOX_KEYPAIRBYTES

const CRYPTO_BOX_KEYPAIRBYTES = 64

◆ CRYPTO_BOX_MACBYTES

const CRYPTO_BOX_MACBYTES = 16

◆ CRYPTO_BOX_NONCEBYTES

const CRYPTO_BOX_NONCEBYTES = 24

◆ CRYPTO_BOX_PUBLICKEYBYTES

const CRYPTO_BOX_PUBLICKEYBYTES = 32

◆ CRYPTO_BOX_SEALBYTES

const CRYPTO_BOX_SEALBYTES = 16

◆ CRYPTO_BOX_SECRETKEYBYTES

◆ CRYPTO_BOX_SEEDBYTES

const CRYPTO_BOX_SEEDBYTES = 32

◆ CRYPTO_GENERICHASH_BYTES

const CRYPTO_GENERICHASH_BYTES = 32

◆ CRYPTO_GENERICHASH_BYTES_MAX

const CRYPTO_GENERICHASH_BYTES_MAX = 64

◆ CRYPTO_GENERICHASH_BYTES_MIN

const CRYPTO_GENERICHASH_BYTES_MIN = 16

◆ CRYPTO_GENERICHASH_KEYBYTES

const CRYPTO_GENERICHASH_KEYBYTES = 32

◆ CRYPTO_GENERICHASH_KEYBYTES_MAX

const CRYPTO_GENERICHASH_KEYBYTES_MAX = 64

◆ CRYPTO_GENERICHASH_KEYBYTES_MIN

const CRYPTO_GENERICHASH_KEYBYTES_MIN = 16

◆ CRYPTO_KX_BYTES

const CRYPTO_KX_BYTES = 32

◆ CRYPTO_KX_PUBLICKEYBYTES

const CRYPTO_KX_PUBLICKEYBYTES = 32

◆ CRYPTO_KX_SECRETKEYBYTES

const CRYPTO_KX_SECRETKEYBYTES = 32

◆ CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE

const CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE = 33554432

◆ CRYPTO_PWHASH_MEMLIMIT_MODERATE

const CRYPTO_PWHASH_MEMLIMIT_MODERATE = 134217728

◆ CRYPTO_PWHASH_MEMLIMIT_SENSITIVE

const CRYPTO_PWHASH_MEMLIMIT_SENSITIVE = 536870912

◆ CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE

const CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE = 4

◆ CRYPTO_PWHASH_OPSLIMIT_MODERATE

const CRYPTO_PWHASH_OPSLIMIT_MODERATE = 6

◆ CRYPTO_PWHASH_OPSLIMIT_SENSITIVE

const CRYPTO_PWHASH_OPSLIMIT_SENSITIVE = 8

◆ CRYPTO_PWHASH_SALTBYTES

const CRYPTO_PWHASH_SALTBYTES = 16

◆ CRYPTO_PWHASH_SCRYPTSALSA208SHA256_MEMLIMIT_INTERACTIVE

const CRYPTO_PWHASH_SCRYPTSALSA208SHA256_MEMLIMIT_INTERACTIVE = 16777216

◆ CRYPTO_PWHASH_SCRYPTSALSA208SHA256_MEMLIMIT_SENSITIVE

const CRYPTO_PWHASH_SCRYPTSALSA208SHA256_MEMLIMIT_SENSITIVE = 1073741824

◆ CRYPTO_PWHASH_SCRYPTSALSA208SHA256_OPSLIMIT_INTERACTIVE

const CRYPTO_PWHASH_SCRYPTSALSA208SHA256_OPSLIMIT_INTERACTIVE = 534288

◆ CRYPTO_PWHASH_SCRYPTSALSA208SHA256_OPSLIMIT_SENSITIVE

const CRYPTO_PWHASH_SCRYPTSALSA208SHA256_OPSLIMIT_SENSITIVE = 33554432

◆ CRYPTO_PWHASH_SCRYPTSALSA208SHA256_SALTBYTES

const CRYPTO_PWHASH_SCRYPTSALSA208SHA256_SALTBYTES = 32

◆ CRYPTO_PWHASH_SCRYPTSALSA208SHA256_STRPREFIX

const CRYPTO_PWHASH_SCRYPTSALSA208SHA256_STRPREFIX = '$7$'

◆ CRYPTO_PWHASH_STRPREFIX

const CRYPTO_PWHASH_STRPREFIX = '$argon2i$'

◆ CRYPTO_SCALARMULT_BYTES

const CRYPTO_SCALARMULT_BYTES = 32

◆ CRYPTO_SCALARMULT_SCALARBYTES

const CRYPTO_SCALARMULT_SCALARBYTES = 32

◆ CRYPTO_SECRETBOX_KEYBYTES

const CRYPTO_SECRETBOX_KEYBYTES = 32

◆ CRYPTO_SECRETBOX_MACBYTES

const CRYPTO_SECRETBOX_MACBYTES = 16

◆ CRYPTO_SECRETBOX_NONCEBYTES

const CRYPTO_SECRETBOX_NONCEBYTES = 24

◆ CRYPTO_SHORTHASH_BYTES

const CRYPTO_SHORTHASH_BYTES = 8

◆ CRYPTO_SHORTHASH_KEYBYTES

const CRYPTO_SHORTHASH_KEYBYTES = 16

◆ CRYPTO_SIGN_BYTES

const CRYPTO_SIGN_BYTES = 64

◆ CRYPTO_SIGN_KEYPAIRBYTES

const CRYPTO_SIGN_KEYPAIRBYTES = 96

◆ CRYPTO_SIGN_PUBLICKEYBYTES

const CRYPTO_SIGN_PUBLICKEYBYTES = 32

◆ CRYPTO_SIGN_SECRETKEYBYTES

const CRYPTO_SIGN_SECRETKEYBYTES = 64

◆ CRYPTO_SIGN_SEEDBYTES

const CRYPTO_SIGN_SEEDBYTES = 32

◆ CRYPTO_STREAM_KEYBYTES

const CRYPTO_STREAM_KEYBYTES = 32

◆ CRYPTO_STREAM_NONCEBYTES

const CRYPTO_STREAM_NONCEBYTES = 24

◆ LIBRARY_VERSION_MAJOR

const LIBRARY_VERSION_MAJOR = 9

◆ LIBRARY_VERSION_MINOR

const LIBRARY_VERSION_MINOR = 1

◆ VERSION_STRING

const VERSION_STRING = 'polyfill-1.0.8'

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