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

Fonctions membres publiques

 __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 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

 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 safe_intval ($x)
 
static safe_intval_inline ()
 
static nullPad128 ($str)
 

Attributs protégés

 $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

 openssl_ctr_process ($plaintext, &$encryptIV, &$buffer)
 
 openssl_ofb_process ($plaintext, &$encryptIV, &$buffer)
 
 setupGCM ()
 
 ghash ($x)
 

Fonctions membres privées statiques

static pkcs12helper ($n, $hashObj, $i, $d, $count)
 
static len64 ($str)
 

Attributs privés

 $enmcrypt
 
 $demcrypt
 
 $enchanged = true
 
 $dechanged = true
 
 $ecb
 
 $padding = true
 
 $paddable = false
 
 $preferredEngine
 
 $password_default_salt = 'phpseclib/salt'
 
 $openssl_emulate_ctr = false
 
 $skip_key_adjustment = false
 
 $h
 
 $origIV = false
 

Attributs privés statiques

static $gcmField
 
static $poly1305Field
 

Documentation des constructeurs et destructeur

◆ __construct()

__construct (   $mode)

Default Constructor.

$mode could be:

  • ecb
  • cbc
  • ctr
  • cfb
  • cfb8
  • ofb
  • ofb8
  • gcm
Paramètres
string$modepublic
Exceptions
BadModeExceptionif an invalid / unsupported mode is provided

Références SymmetricKey\$mode.

Documentation des fonctions membres

◆ createInlineCryptFunction()

createInlineCryptFunction (   $cipher_code)
protected

Setup the performance-optimized function for de/encrypt()

Stores the created (or existing) callback function-name in $this->inline_crypt

Internally for phpseclib developers:

_setupInlineCrypt() would be called only if:

- $this->engine === self::ENGINE_EVAL

- each time on _setup(), after(!) _setupKey()


This ensures that _setupInlineCrypt() has always a
full ready2go initializated internal cipher $engine state
where, for example, the keys already expanded,
keys/block_size calculated and such.

It is, each time if called, the responsibility of _setupInlineCrypt():

- to set $this->inline_crypt to a valid and fully working callback function
  as a (faster) replacement for encrypt() / decrypt()

- NOT to create unlimited callback functions (for memory reasons!)
  no matter how often _setupInlineCrypt() would be called. At some
  point of amount they must be generic re-useable.

- the code of _setupInlineCrypt() it self,
  and the generated callback code,
  must be, in following order:
  - 100% safe
  - 100% compatible to encrypt()/decrypt()
  - using only php5+ features/lang-constructs/php-extensions if
    compatibility (down to php4) or fallback is provided
  - readable/maintainable/understandable/commented and... not-cryptic-styled-code :-)
  - >= 10% faster than encrypt()/decrypt() [which is, by the way,
    the reason for the existence of _setupInlineCrypt() :-)]
  - memory-nice
  - short (as good as possible)

Note: - _setupInlineCrypt() is using _createInlineCryptFunction() to create the full callback function code.

  • In case of using inline crypting, _setupInlineCrypt() must extend by the child * class.
  • The following variable names are reserved:
    • $_* (all variable names prefixed with an underscore)
    • $self (object reference to it self. Do not use $this, but $self instead)
    • $in (the content of $in has to en/decrypt by the generated code)
  • The callback function should not use the 'return' statement, but en/decrypt'ing the content of $in only

{ Creates the performance-optimized function for en/decrypt()

Internally for phpseclib developers:

_createInlineCryptFunction():

  • merge the $cipher_code [setup'ed by _setupInlineCrypt()] with the current [$this->]mode of operation code
  • create the $inline function, which called by encrypt() / decrypt() as its replacement to speed up the en/decryption operations.
  • return the name of the created $inline callback function
  • used to speed up en/decryption

The main reason why can speed up things [up to 50%] this way are:

  • using variables more effective then regular. (ie no use of expensive arrays but integers $k_0, $k_1 ... or even, for example, the pure $key[] values hardcoded)
  • avoiding 1000's of function calls of ie _encryptBlock() but inlining the crypt operations. in the mode of operation for() loop.
  • full loop unroll the (sometimes key-dependent) rounds avoiding this way ++$i counters and runtime-if's etc...

The basic code architectur of the generated $inline en/decrypt() lambda function, in pseudo php, is:

+-------------------------------------------------------------------------------------------—+ | callback $inline = create_function: | | lambda_function_0001_crypt_ECB($action, $text) | | { | | INSERT PHP CODE OF: | | $cipher_code['init_crypt']; // general init code. | | // ie: $sbox'es declarations used for |

// encrypt and decrypt'ing.
switch ($action) {
case 'encrypt':
INSERT PHP CODE OF:
$cipher_code['init_encrypt']; // encrypt sepcific init code.
ie: specified $key or $box
declarations for encrypt'ing.
foreach ($ciphertext) {
$in = $block_size of $ciphertext;
INSERT PHP CODE OF:
$cipher_code['encrypt_block']; // encrypt's (string) $in, which is always:
// strlen($in) == $this->block_size
// here comes the cipher algorithm in action
// for encryption.
// $cipher_code['encrypt_block'] has to
// encrypt the content of the $in variable
$plaintext .= $in;
}
return $plaintext;
case 'decrypt':
INSERT PHP CODE OF:
$cipher_code['init_decrypt']; // decrypt sepcific init code
ie: specified $key or $box
declarations for decrypt'ing.
foreach ($plaintext) {
$in = $block_size of $plaintext;
INSERT PHP CODE OF:
$cipher_code['decrypt_block']; // decrypt's (string) $in, which is always
// strlen($in) == $this->block_size
// here comes the cipher algorithm in action
// for decryption.
// $cipher_code['decrypt_block'] has to
// decrypt the content of the $in variable
$ciphertext .= $in;
}
return $ciphertext;
}
}

+-------------------------------------------------------------------------------------------—+

See also the *::_setupInlineCrypt()'s for productive inline $cipher_code's how they works.

Structure of: $cipher_code = [ 'init_crypt' => (string) '', // optional 'init_encrypt' => (string) '', // optional 'init_decrypt' => (string) '', // optional 'encrypt_block' => (string) '', // required 'decrypt_block' => (string) '' // required ];

Voir également
self::setupInlineCrypt()
self::encrypt()
self::decrypt()
Paramètres
array$cipher_codeprivate
Renvoie
string (the name of the created callback function)

Références SymmetricKey\$block_size, $this, et class.

Référencé par Blowfish\setupInlineCrypt(), RC2\setupInlineCrypt(), Twofish\setupInlineCrypt(), Rijndael\setupInlineCrypt(), et DES\setupInlineCrypt().

◆ decrypt()

◆ decryptBlock()

decryptBlock (   $in)
abstractprotected

Decrypts a block

Note: Must be extended by the child * class

private

Paramètres
string$in
Renvoie
string

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

◆ disableContinuousBuffer()

disableContinuousBuffer ( )

Treat consecutive packets as if they are a discontinuous buffer.

The default behavior.

{

Références SymmetricKey\setEngine().

◆ disablePadding()

disablePadding ( )

Do not pad packets.

Voir également
self::enablePadding() public

◆ enableContinuousBuffer()

enableContinuousBuffer ( )

Treat consecutive "packets" as if they are a continuous buffer.

Say you have a 32-byte plaintext $plaintext. Using the default behavior, the two following code snippets will yield different outputs:

echo $rijndael->encrypt(substr($plaintext, 0, 16)); echo $rijndael->encrypt(substr($plaintext, 16, 16)); echo $rijndael->encrypt($plaintext);

The solution is to enable the continuous buffer. Although this will resolve the above discrepancy, it creates another, as demonstrated with the following:

$rijndael->encrypt(substr($plaintext, 0, 16)); echo $rijndael->decrypt($rijndael->encrypt(substr($plaintext, 16, 16))); echo $rijndael->decrypt($rijndael->encrypt(substr($plaintext, 16, 16)));

With the continuous buffer disabled, these would yield the same output. With it enabled, they yield different outputs. The reason is due to the fact that the initialization vector's change after every encryption / decryption round when the continuous buffer is enabled. When it's disabled, they remain constant.

Put another way, when the continuous buffer is enabled, the state of the *() object changes after each encryption / decryption round, whereas otherwise, it'd remain constant. For this reason, it's recommended that continuous buffers not be used. They do offer better security and are, in fact, sometimes required (SSH uses them), however, they are also less intuitive and more likely to cause you problems.

{

Références SymmetricKey\setEngine().

◆ enablePadding()

enablePadding ( )

Pad "packets".

Block ciphers working by encrypting between their specified [$this->]block_size at a time If you ever need to encrypt or decrypt something that isn't of the proper length, it becomes necessary to pad the input so that it is of the proper length.

Padding is enabled by default. Sometimes, however, it is undesirable to pad strings. Such is the case in SSH, where "packets" are padded with random bytes before being encrypted. Unpad these packets and you risk stripping away characters that shouldn't be stripped away. (SSH knows how many bytes are added because the length is transmitted separately)

Voir également
self::disablePadding() public

◆ enablePoly1305()

enablePoly1305 ( )

Enables Poly1305 mode.

Once enabled Poly1305 cannot be disabled.

public

Exceptions

◆ encrypt()

encrypt (   $plaintext)

Encrypts a message.

$plaintext will be padded with additional bytes such that it's length is a multiple of the block size. Other cipher implementations may or may not pad in the same manner. Other common approaches to padding and the reasons why it's necessary are discussed in the following URL:

http://www.di-mgt.com.au/cryptopad.html

An alternative to padding is to, separately, send the length of the file. This is what SSH, in fact, does. strlen($plaintext) will still need to be a multiple of the block size, however, arbitrary values can be added to make it that length.

{

Références SymmetricKey\$block_size, $buffer, $c, SymmetricKey\$enbuffer, SymmetricKey\$encryptIV, $i, SymmetricKey\$inline_crypt, SymmetricKey\$iv, SymmetricKey\$key, $result, $size, $start, $this, elseif, SymmetricKey\encryptBlock(), SymmetricKey\getIV(), SymmetricKey\ghash(), Strings\increment_str(), SymmetricKey\openssl_ctr_process(), SymmetricKey\openssl_ofb_process(), SymmetricKey\pad(), SymmetricKey\poly1305(), Strings\pop(), SymmetricKey\setup(), et Strings\shift().

◆ encryptBlock()

encryptBlock (   $in)
abstractprotected

Encrypts a block

Note: Must be extended by the child * class

private

Paramètres
string$in
Renvoie
string

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

◆ getBlockLength()

getBlockLength ( )

Returns the current block length in bits

public

Renvoie
int

◆ getBlockLengthInBytes()

getBlockLengthInBytes ( )

Returns the current block length in bytes

public

Renvoie
int

Références SymmetricKey\$block_size.

◆ getEngine()

getEngine ( )

Returns the engine currently being utilized

Voir également
self::setEngine() public

Références SymmetricKey\$engine.

◆ getIV()

getIV (   $iv)
protected

Get the IV

mcrypt requires an IV even if ECB is used

Voir également
self::encrypt()
self::decrypt()
Paramètres
string$iv
Renvoie
string private

Références SymmetricKey\$iv.

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

◆ getKeyLength()

getKeyLength ( )

Returns the current key length in bits

public

Renvoie
int

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

◆ getMode()

getMode ( )

Return the mode

You can do $obj instanceof AES or whatever to get the cipher but you can't do that to get the mode

public

Renvoie
string

Références SymmetricKey\$mode.

◆ getTag()

getTag (   $length = 16)

Get the authentication tag

Only used in GCM or Poly1305 mode

Voir également
self::encrypt()
Paramètres
int$lengthoptional
Renvoie
string public
Exceptions

◆ ghash()

ghash (   $x)
private

Performs GHASH operation

See https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf#page=20 for more info

Voir également
self::decrypt()
self::encrypt() private
Paramètres
string$x
Renvoie
string

Références SymmetricKey\$h, $n, $temp, et Strings\switchEndianness().

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

◆ isValidEngine()

isValidEngine (   $engine)

Test for engine validity

Voir également
self::__construct()
Paramètres
string$enginepublic
Renvoie
bool

Références SymmetricKey\$engine, et SymmetricKey\isValidEngineHelper().

◆ isValidEngineHelper()

isValidEngineHelper (   $engine)
protected

Test for engine validity

Voir également
self::__construct()
Paramètres
int$engineprivate
Renvoie
bool

Références SymmetricKey\$engine, $result, et $this.

Référencé par SymmetricKey\isValidEngine(), et SymmetricKey\setEngine().

◆ len64()

static len64 (   $str)
staticprivate

Returns the bit length of a string in a packed format

Voir également
self::decrypt()
self::encrypt()
self::setupGCM() private
Paramètres
string$str
Renvoie
string

◆ nullPad128()

static nullPad128 (   $str)
staticprotected

NULL pads a string to be a multiple of 128

Voir également
self::decrypt()
self::encrypt()
self::setupGCM() private
Paramètres
string$str
Renvoie
string

◆ openssl_ctr_process()

openssl_ctr_process (   $plaintext,
$encryptIV,
$buffer 
)
private

OpenSSL CTR Processor

PHP's OpenSSL bindings do not operate in continuous mode so we'll wrap around it. Since the keystream for CTR is the same for both encrypting and decrypting this function is re-used by both SymmetricKey::encrypt() and SymmetricKey::decrypt(). Also, OpenSSL doesn't implement CTR for all of it's symmetric ciphers so this function will emulate CTR with ECB when necessary.

Voir également
self::encrypt()
self::decrypt()
Paramètres
string$plaintext
string$encryptIV
array$buffer
Renvoie
string private

Références SymmetricKey\$block_size, $buffer, SymmetricKey\$encryptIV, $i, SymmetricKey\$key, $start, $temp, elseif, Strings\increment_str(), Strings\pop(), et Strings\shift().

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

◆ openssl_ofb_process()

openssl_ofb_process (   $plaintext,
$encryptIV,
$buffer 
)
private

OpenSSL OFB Processor

PHP's OpenSSL bindings do not operate in continuous mode so we'll wrap around it. Since the keystream for OFB is the same for both encrypting and decrypting this function is re-used by both SymmetricKey::encrypt() and SymmetricKey::decrypt().

Voir également
self::encrypt()
self::decrypt()
Paramètres
string$plaintext
string$encryptIV
array$buffer
Renvoie
string private

Références SymmetricKey\$block_size, $buffer, SymmetricKey\$encryptIV, SymmetricKey\$key, Strings\pop(), et Strings\shift().

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

◆ openssl_translate_mode()

openssl_translate_mode ( )
protected

phpseclib <-> OpenSSL Mode Mapper

May need to be overwritten by classes extending this one in some cases

Renvoie
string private

Référencé par TripleDES\isValidEngineHelper(), Rijndael\isValidEngineHelper(), RC2\isValidEngineHelper(), Blowfish\isValidEngineHelper(), et DES\isValidEngineHelper().

◆ pad()

pad (   $text)
protected

Pads a string

Pads a string using the RSA PKCS padding standards so that its length is a multiple of the blocksize. $this->block_size - (strlen($text) % $this->block_size) bytes are added, each of which is equal to chr($this->block_size - (strlen($text) % $this->block_size)

If padding is disabled and $text is not a multiple of the blocksize, the string will be padded regardless and padding will, hence forth, be enabled.

Voir également
self::unpad()
Paramètres
string$text
Exceptions

Références SymmetricKey\$block_size, et $text.

Référencé par TripleDES\encrypt(), et SymmetricKey\encrypt().

◆ pkcs12helper()

static pkcs12helper (   $n,
  $hashObj,
  $i,
  $d,
  $count 
)
staticprivate

PKCS#12 KDF Helper Function

As discussed here:

https://tools.ietf.org/html/rfc7292#appendix-B

Voir également
self::setPassword() private
Paramètres
int$n
\phpseclib3\Crypt\Hash$hashObj
string$i
string$d
int$count
Renvoie
string $a

Références $b, $c, $count, $i, $n, et $temp.

◆ poly1305()

poly1305 (   $text)
protected

Calculates Poly1305 MAC

On my system ChaCha20, with libsodium, takes 0.5s. With this custom Poly1305 implementation it takes 1.2s.

Voir également
self::decrypt()
self::encrypt() private
Paramètres
string$text
Renvoie
string

Références $n, SymmetricKey\$poly1305Key, $r, $text, et Strings\shift().

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

◆ safe_intval()

static safe_intval (   $x)
staticprotected

Convert float to int

On ARM CPUs converting floats to ints doesn't always work

private

Paramètres
string$x
Renvoie
int

◆ safe_intval_inline()

static safe_intval_inline ( )
staticprotected

eval()'able string for in-line float to int

private

Renvoie
string

◆ setAAD()

setAAD (   $aad)

Sets additional authenticated data

setAAD() is only used by gcm or in poly1305 mode

public

Paramètres
string$aad
Exceptions

Références SymmetricKey\$aad.

◆ setEngine()

◆ setIV()

setIV (   $iv)

Sets the initialization vector.

setIV() is not required when ecb or gcm modes are being used.

{

Références SymmetricKey\$iv, et SymmetricKey\usesIV().

Référencé par SymmetricKey\setPassword().

◆ setKey()

setKey (   $key)

Sets the key.

The min/max length(s) of the key depends on the cipher which is used. If the key not fits the length(s) of the cipher it will paded with null bytes up to the closest valid key length. If the key is more than max length, we trim the excess bits.

If the key is not explicitly set, it'll be assumed to be all null bytes.

{

Références SymmetricKey\$key, et SymmetricKey\setEngine().

Référencé par SymmetricKey\setPassword().

◆ setKeyLength()

setKeyLength (   $length)

Sets the key length.

Keys with explicitly set lengths need to be treated accordingly

public

Paramètres
int$length

◆ setNonce()

setNonce (   $nonce)

Sets the nonce.

setNonce() is only required when gcm is used

public

Paramètres
string$nonce
Exceptions

Références SymmetricKey\$nonce, et SymmetricKey\setEngine().

◆ setPassword()

setPassword (   $password,
  $method = 'pbkdf2',
  $func_args 
)

Sets the password.

Depending on what $method is set to, setPassword()'s (optional) parameters are as follows: pbkdf2 or pbkdf1: $hash, $salt, $count, $dkLen

Where $hash (default = sha1) currently supports the following hashes: see: Crypt/Hash.php

{

Références $count, $hash, $i, SymmetricKey\$key, $method, $password, SymmetricKey\$password_default_salt, SymmetricKey\setIV(), SymmetricKey\setKey(), et SymmetricKey\usesIV().

◆ setPoly1305Key()

setPoly1305Key (   $key = null)

Enables Poly1305 mode.

Once enabled Poly1305 cannot be disabled. If $key is not passed then an attempt to call createPoly1305Key will be made.

public

Paramètres
string$keyoptional
Exceptions

Références SymmetricKey\$key.

Référencé par Salsa20\createPoly1305Key().

◆ setPreferredEngine()

setPreferredEngine (   $engine)

Sets the preferred crypt engine

Currently, $engine could be:

  • libsodium[very fast]
  • OpenSSL [very fast]
  • mcrypt [fast]
  • Eval [slow]
  • PHP [slowest]

If the preferred crypt engine is not available the fastest available one will be used

Voir également
self::__construct()
Paramètres
string$enginepublic

Références SymmetricKey\$engine, et SymmetricKey\setEngine().

◆ setTag()

setTag (   $tag)

Sets the authentication tag

Only used in GCM mode

Voir également
self::decrypt()
Paramètres
string$tagpublic
Exceptions

Références $this.

◆ setup()

setup ( )
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érences SymmetricKey\$iv, SymmetricKey\$origIV, $this, SymmetricKey\setupGCM(), SymmetricKey\setupKey(), et SymmetricKey\usesNonce().

Référencé par RC4\crypt(), SymmetricKey\decrypt(), et SymmetricKey\encrypt().

◆ setupGCM()

setupGCM ( )
private

◆ setupKey()

setupKey ( )
abstractprotected

Setup the key (expansion)

Only used if $engine == self::ENGINE_INTERNAL

Note: Must extend by the child * class

Voir également
self::setup() private

Référencé par SymmetricKey\setup().

◆ unpad()

unpad (   $text)
protected

Unpads a string.

If padding is enabled and the reported padding length is invalid the encryption key will be assumed to be wrong and false will be returned.

Voir également
self::pad()
Paramètres
string$text
Exceptions

Références $text.

Référencé par TripleDES\decrypt(), et SymmetricKey\decrypt().

◆ usesIV()

usesIV ( )

Returns whether or not the algorithm uses an IV

public

Renvoie
bool

Référencé par SymmetricKey\setIV(), et SymmetricKey\setPassword().

◆ usesNonce()

usesNonce ( )

Returns whether or not the algorithm uses a nonce

public

Renvoie
bool

Référencé par SymmetricKey\setup().

Documentation des champs

◆ $aad

◆ $block_size

◆ $cfb_init_len

$cfb_init_len = 600
protected

◆ $changed

$changed = true
protected

◆ $cipher_name_mcrypt

$cipher_name_mcrypt
protected

◆ $cipher_name_openssl

$cipher_name_openssl
protected

◆ $cipher_name_openssl_ecb

$cipher_name_openssl_ecb
protected

◆ $continuousBuffer

$continuousBuffer = false
protected

Référencé par ChaCha20\isValidEngineHelper().

◆ $debuffer

$debuffer
protected

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

◆ $dechanged

$dechanged = true
private

◆ $decryptIV

$decryptIV
protected

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

◆ $demcrypt

$demcrypt
private

◆ $ecb

$ecb
private

◆ $enbuffer

$enbuffer
protected

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

◆ $enchanged

$enchanged = true
private

◆ $encryptIV

◆ $engine

◆ $enmcrypt

$enmcrypt
private

◆ $explicit_key_length

$explicit_key_length = false
protected

◆ $gcmField

$gcmField
staticprivate

◆ $h

$h
private

Référencé par SymmetricKey\ghash().

◆ $inline_crypt

$inline_crypt
protected

◆ $iv

◆ $key

◆ $mode

◆ $newtag

◆ $nonce

◆ $nonIVChanged

$nonIVChanged = true
protected

◆ $oldtag

$oldtag = false
protected

◆ $openssl_emulate_ctr

$openssl_emulate_ctr = false
private

◆ $origIV

$origIV = false
private

Référencé par SymmetricKey\setup().

◆ $paddable

$paddable = false
private

◆ $padding

$padding = true
private

◆ $password_default_salt

$password_default_salt = 'phpseclib/salt'
private

Référencé par SymmetricKey\setPassword().

◆ $poly1305Field

$poly1305Field
staticprivate

◆ $poly1305Key

$poly1305Key
protected

Référencé par SymmetricKey\poly1305().

◆ $preferredEngine

$preferredEngine
private

Référencé par SymmetricKey\setEngine().

◆ $skip_key_adjustment

$skip_key_adjustment = false
private

◆ $usePoly1305

$usePoly1305 = false
protected

◆ ENGINE_EVAL

const ENGINE_EVAL = 2

Base value for the eval() implementation $engine switch

private

Voir également
__construct()

◆ ENGINE_INTERNAL

const const ENGINE_INTERNAL = 1

Base value for the internal implementation $engine switch

private

Voir également
__construct()

◆ ENGINE_LIBSODIUM

const ENGINE_LIBSODIUM = 5

Base value for the libsodium implementation $engine switch

private

Voir également
__construct()

◆ ENGINE_MAP

const ENGINE_MAP
Valeur initiale :
= [
self::ENGINE_INTERNAL => 'PHP'

Engine Reverse Map

private

Voir également
::getEngine()

◆ ENGINE_MCRYPT

const ENGINE_MCRYPT = 3

Base value for the mcrypt implementation $engine switch

private

Voir également
__construct()

◆ ENGINE_OPENSSL

const ENGINE_OPENSSL = 4

Base value for the openssl implementation $engine switch

private

Voir également
__construct()

◆ ENGINE_OPENSSL_GCM

const ENGINE_OPENSSL_GCM = 6

Base value for the openssl / gcm implementation $engine switch

private

Voir également
__construct()

◆ MODE_CBC

const MODE_CBC = 2

Encrypt / decrypt using the Code Book Chaining mode.

public ::encrypt() ::decrypt()

◆ MODE_CFB

const MODE_CFB = 3

Encrypt / decrypt using the Cipher Feedback mode.

public ::encrypt() ::decrypt()

◆ MODE_CFB8

const MODE_CFB8 = 7

Encrypt / decrypt using the Cipher Feedback mode (8bit)

public

Voir également
::encrypt()
::decrypt()

◆ MODE_CTR

const MODE_CTR = -1

Encrypt / decrypt using the Counter mode.

Set to -1 since that's what Crypt/Random.php uses to index the CTR mode.

public ::encrypt() ::decrypt()

◆ MODE_ECB

const MODE_ECB = 1

Encrypt / decrypt using the Electronic Code Book mode.

public ::encrypt() ::decrypt()

◆ MODE_GCM

const MODE_GCM = 5

Encrypt / decrypt using Galois/Counter mode.

public ::encrypt() ::decrypt()

◆ MODE_MAP

const MODE_MAP
Valeur initiale :
= [
'ctr' => self::MODE_CTR

Mode Map

private

Voir également
__construct()

◆ MODE_OFB

const MODE_OFB = 4

Encrypt / decrypt using the Output Feedback mode.

public ::encrypt() ::decrypt()

◆ MODE_OFB8

const MODE_OFB8 = 8

Encrypt / decrypt using the Output Feedback mode (8bit)

public

Voir également
::encrypt()
::decrypt()

◆ MODE_STREAM

const MODE_STREAM = 6

Encrypt / decrypt using streaming mode.

public

Voir également
::encrypt()
::decrypt()

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