Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques | |
usesNonce () | |
setKey ($key) | |
setNonce ($nonce) | |
setCounter ($counter) | |
encrypt ($plaintext) | |
decrypt ($ciphertext) | |
Fonctions membres publiques hérités de StreamCipher | |
__construct () | |
usesIV () | |
Fonctions membres publiques hérités de SymmetricKey | |
__construct ($mode) | |
setIV ($iv) | |
enablePoly1305 () | |
setPoly1305Key ($key=null) | |
setNonce ($nonce) | |
setAAD ($aad) | |
usesIV () | |
usesNonce () | |
getKeyLength () | |
getBlockLength () | |
getBlockLengthInBytes () | |
setKeyLength ($length) | |
setKey ($key) | |
setPassword ($password, $method='pbkdf2',... $func_args) | |
encrypt ($plaintext) | |
decrypt ($ciphertext) | |
getTag ($length=16) | |
setTag ($tag) | |
enablePadding () | |
disablePadding () | |
enableContinuousBuffer () | |
disableContinuousBuffer () | |
isValidEngine ($engine) | |
setPreferredEngine ($engine) | |
getEngine () | |
getMode () | |
Champs de données | |
const | ENCRYPT = 0 |
const | DECRYPT = 1 |
Champs de données hérités de SymmetricKey | |
const | MODE_CTR = -1 |
const | MODE_ECB = 1 |
const | MODE_CBC = 2 |
const | MODE_CFB = 3 |
const | MODE_CFB8 = 7 |
const | MODE_OFB8 = 8 |
const | MODE_OFB = 4 |
const | MODE_GCM = 5 |
const | MODE_STREAM = 6 |
const | MODE_MAP |
const const | ENGINE_INTERNAL = 1 |
const | ENGINE_EVAL = 2 |
const | ENGINE_MCRYPT = 3 |
const | ENGINE_OPENSSL = 4 |
const | ENGINE_LIBSODIUM = 5 |
const | ENGINE_OPENSSL_GCM = 6 |
const | ENGINE_MAP |
Fonctions membres protégées | |
createPoly1305Key () | |
setup () | |
setupKey () | |
encryptBlock ($in) | |
decryptBlock ($in) | |
poly1305 ($ciphertext) | |
Fonctions membres protégées hérités de SymmetricKey | |
getIV ($iv) | |
openssl_translate_mode () | |
isValidEngineHelper ($engine) | |
setEngine () | |
encryptBlock ($in) | |
decryptBlock ($in) | |
setupKey () | |
setup () | |
pad ($text) | |
unpad ($text) | |
createInlineCryptFunction ($cipher_code) | |
poly1305 ($text) | |
Fonctions membres protégées statiques | |
static | leftRotate ($x, $n) |
static | quarterRound (&$a, &$b, &$c, &$d) |
static | doubleRound (&$x0, &$x1, &$x2, &$x3, &$x4, &$x5, &$x6, &$x7, &$x8, &$x9, &$x10, &$x11, &$x12, &$x13, &$x14, &$x15) |
static | salsa20 ($x) |
Fonctions membres protégées statiques hérités de SymmetricKey | |
static | safe_intval ($x) |
static | safe_intval_inline () |
static | nullPad128 ($str) |
Attributs protégés | |
$p1 = false | |
$p2 = false | |
$key_length = 32 | |
$enbuffer | |
$debuffer | |
$counter = 0 | |
$usingGeneratedPoly1305Key = false | |
Attributs protégés hérités de StreamCipher | |
$block_size = 0 | |
Attributs protégés hérités de SymmetricKey | |
$mode | |
$block_size = 16 | |
$key = false | |
$iv = false | |
$encryptIV | |
$decryptIV | |
$continuousBuffer = false | |
$enbuffer | |
$debuffer | |
$cfb_init_len = 600 | |
$changed = true | |
$nonIVChanged = true | |
$engine | |
$cipher_name_mcrypt | |
$cipher_name_openssl | |
$cipher_name_openssl_ecb | |
$inline_crypt | |
$explicit_key_length = false | |
$aad = '' | |
$newtag = false | |
$oldtag = false | |
$poly1305Key | |
$usePoly1305 = false | |
$nonce = false | |
Fonctions membres privées | |
crypt ($text, $mode) | |
|
protected |
Creates a Poly1305 key using the method discussed in RFC8439
See https://tools.ietf.org/html/rfc8439#section-2.6.1
Références $c, $this, counter, et SymmetricKey\setPoly1305Key().
Référencé par Salsa20\setup(), et ChaCha20\setup().
|
private |
Encrypts or decrypts a message.
string | $text | |
int | $mode |
Références $buffer, Salsa20\$counter, Salsa20\$debuffer, Salsa20\$enbuffer, $i, SymmetricKey\$iv, SymmetricKey\$mode, Salsa20\$p2, $temp, $text, counter, elseif, Strings\pop(), Salsa20\setup(), et Strings\shift().
Référencé par Salsa20\decrypt(), et Salsa20\encrypt().
decrypt | ( | $ciphertext | ) |
Decrypts a message.
$this->decrypt($this->encrypt($plaintext)) == $this->encrypt($this->encrypt($plaintext)). At least if the continuous buffer is disabled.
string | $ciphertext |
Références SymmetricKey\$newtag, Salsa20\crypt(), et Salsa20\poly1305().
|
protected |
Decrypts a block
string | $in |
|
staticprotected |
The doubleround function
int | $x0 | (by reference) |
int | $x1 | (by reference) |
int | $x2 | (by reference) |
int | $x3 | (by reference) |
int | $x4 | (by reference) |
int | $x5 | (by reference) |
int | $x6 | (by reference) |
int | $x7 | (by reference) |
int | $x8 | (by reference) |
int | $x9 | (by reference) |
int | $x10 | (by reference) |
int | $x11 | (by reference) |
int | $x12 | (by reference) |
int | $x13 | (by reference) |
int | $x14 | (by reference) |
int | $x15 | (by reference) |
encrypt | ( | $plaintext | ) |
Encrypts a message.
string | $plaintext |
Références Salsa20\crypt(), et Salsa20\poly1305().
|
protected |
Encrypts a block
string | $in |
|
staticprotected |
|
protected |
Calculates Poly1305 MAC
string | $ciphertext |
Référencé par Salsa20\decrypt(), ChaCha20\decrypt_with_libsodium(), Salsa20\encrypt(), et ChaCha20\encrypt_with_libsodium().
|
staticprotected |
|
staticprotected |
setCounter | ( | $counter | ) |
Sets the counter.
int | $counter |
Références Salsa20\$counter, counter, et SymmetricKey\setEngine().
setKey | ( | $key | ) |
setNonce | ( | $nonce | ) |
Sets the nonce.
string | $nonce |
Références SymmetricKey\$key, SymmetricKey\$nonce, et SymmetricKey\setEngine().
|
protected |
Setup the self::ENGINE_INTERNAL $engine
(re)init, if necessary, the internal cipher $engine
_setup() will be called each time if $changed === true typically this happens when using one or more of following public methods:
Références Salsa20\$counter, SymmetricKey\$key, et Salsa20\createPoly1305Key().
Référencé par Salsa20\crypt().
|
protected |
Setup the key (expansion)
usesNonce | ( | ) |
Salsa20 uses a nonce
|
protected |
Référencé par Salsa20\crypt(), Salsa20\setCounter(), Salsa20\setup(), et ChaCha20\setup().
|
protected |
Référencé par Salsa20\crypt().
|
protected |
Référencé par Salsa20\crypt().
|
protected |
|
protected |
|
protected |
Référencé par Salsa20\crypt(), et ChaCha20\setup().
|
protected |
const DECRYPT = 1 |
private
const ENCRYPT = 0 |
private