Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques | |
__construct ($mode) | |
setKeyLength ($length) | |
setKey ($key) | |
setBlockLength ($length) | |
encrypt ($plaintext) | |
decrypt ($ciphertext) | |
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 () | |
Fonctions membres protégées | |
isValidEngineHelper ($engine) | |
encryptBlock ($in) | |
decryptBlock ($in) | |
setup () | |
setupKey () | |
& | getTables () |
& | getInvTables () |
setupInlineCrypt () | |
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) | |
Attributs protégés | |
$cipher_name_mcrypt = 'rijndael-128' | |
$key_length = 16 | |
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 | |
subWord ($word) | |
Attributs privés | |
$w | |
$dw | |
$Nb = 4 | |
$Nk = 4 | |
$Nr | |
$c | |
$kl | |
Membres hérités additionnels | |
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 statiques hérités de SymmetricKey | |
static | safe_intval ($x) |
static | safe_intval_inline () |
static | nullPad128 ($str) |
__construct | ( | $mode | ) |
Default Constructor.
string | $mode | public |
Références SymmetricKey\$mode, et Symfony\Contracts\Service\__construct().
decrypt | ( | $ciphertext | ) |
Decrypts a message.
string | $ciphertext |
Références SymmetricKey\getKeyLength(), et Rijndael\setup().
|
protected |
Decrypts a block
private
string | $in |
Références Rijndael\$c, Rijndael\$dw, $i, Rijndael\$Nb, Rijndael\$Nr, $state, $temp, et Rijndael\getInvTables().
encrypt | ( | $plaintext | ) |
Encrypts a message.
string | $plaintext |
Références SymmetricKey\getKeyLength(), Rijndael\setup(), et Strings\shift().
|
protected |
Encrypts a block
private
string | $in |
Références Rijndael\$c, $i, Rijndael\$Nb, Rijndael\$Nr, $state, $temp, Rijndael\$w, et Rijndael\getTables().
|
protected |
Provides the inverse mixColumns and inverse sboxes tables
Référencé par Rijndael\decryptBlock(), et Rijndael\setupKey().
|
protected |
Provides the mixColumns and sboxes tables
Référencé par Rijndael\encryptBlock().
|
protected |
Test for engine validity
This is mainly just a wrapper to set things up for ::isValidEngine()
int | $engine | protected |
Références SymmetricKey\$engine, SymmetricKey\getKeyLength(), et SymmetricKey\openssl_translate_mode().
setBlockLength | ( | $length | ) |
Sets the block length
Valid block lengths are 128, 160, 192, 224, and 256.
public
int | $length |
Références SymmetricKey\setEngine().
setKey | ( | $key | ) |
Sets the key.
Rijndael supports five different key lengths
string | $key |
Références SymmetricKey\$key.
setKeyLength | ( | $length | ) |
Sets the key length.
Valid key lengths are 128, 160, 192, 224, and 256.
Note: phpseclib extends Rijndael (and AES) for using 160- and 224-bit keys but they are officially not defined and the most (if not all) implementations are not able using 160/224-bit keys but round/pad them up to 192/256 bits as, for example, mcrypt will do.
That said, if you want be compatible with other Rijndael and AES implementations, you should not setKeyLength(160) or setKeyLength(224).
Additional: In case of 160- and 224-bit keys, phpseclib will/can, for that reason, not use the mcrypt php extension, even if available. This results then in slower encryption.
public
|
protected |
Setup the self::ENGINE_INTERNAL $engine
(re)init, if necessary, the internal cipher $engine and flush all $buffers Used (only) if $engine == self::ENGINE_INTERNAL
_setup() will be called each time if $changed === true typically this happens when using one or more of following public methods:
{
Référencé par Rijndael\decrypt(), et Rijndael\encrypt().
|
protected |
Setup the performance-optimized function for de/encrypt()
Références Rijndael\$c, Rijndael\$dw, $i, Rijndael\$Nb, Rijndael\$Nr, Rijndael\$w, et SymmetricKey\createInlineCryptFunction().
|
protected |
Setup the key (expansion)
Références SymmetricKey\$block_size, Rijndael\$c, Rijndael\$dw, $i, SymmetricKey\$key, Rijndael\$key_length, Rijndael\$Nk, $r, $temp, Rijndael\$w, elseif, Rijndael\getInvTables(), et Rijndael\subWord().
|
private |
Performs S-Box substitutions
int | $word |
Référencé par Rijndael\setupKey().
|
private |
Référencé par Rijndael\decryptBlock(), Rijndael\encryptBlock(), Rijndael\setupInlineCrypt(), et Rijndael\setupKey().
|
protected |
|
private |
Référencé par Rijndael\decryptBlock(), Rijndael\setupInlineCrypt(), et Rijndael\setupKey().
|
protected |
|
private |
|
private |
The Block Length divided by 32
{
Référencé par Rijndael\decryptBlock(), Rijndael\encryptBlock(), et Rijndael\setupInlineCrypt().
|
private |
Référencé par Rijndael\setupKey().
|
private |
The Number of Rounds
{
Référencé par Rijndael\decryptBlock(), Rijndael\encryptBlock(), et Rijndael\setupInlineCrypt().
|
private |
Référencé par Rijndael\encryptBlock(), Rijndael\setupInlineCrypt(), et Rijndael\setupKey().