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

Fonctions membres publiques

 __construct ($mode)
 
 setKey ($key)
 
- 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

 isValidEngineHelper ($engine)
 
 encryptBlock ($in)
 
 decryptBlock ($in)
 
 setupKey ()
 
 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

 $block_size = 8
 
 $key_length = 8
 
 $cipher_name_mcrypt = 'des'
 
 $openssl_mode_names
 
 $cfb_init_len = 500
 
 $des_rounds = 1
 
 $key_length_max = 8
 
- 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
 

Attributs protégés statiques

static $shuffle
 
static $ipmap
 
static $invipmap
 
static $sbox1
 
static $sbox2
 
static $sbox3
 
static $sbox4
 
static $sbox5
 
static $sbox6
 
static $sbox7
 
static $sbox8
 

Fonctions membres privées

 processBlock ($block, $mode)
 

Attributs privés

 $keys
 

Membres hérités additionnels

- Fonctions membres protégées statiques hérités de SymmetricKey
static safe_intval ($x)
 
static safe_intval_inline ()
 
static nullPad128 ($str)
 

Documentation des constructeurs et destructeur

◆ __construct()

__construct (   $mode)

Default Constructor.

Paramètres
string$modepublic
Exceptions
BadModeExceptionif an invalid / unsupported mode is provided

Références SymmetricKey\$mode, et Symfony\Contracts\Service\__construct().

Documentation des fonctions membres

◆ decryptBlock()

decryptBlock (   $in)
protected

Decrypts a block

Voir également
::decryptBlock()
::decrypt()
self::decrypt() private
Paramètres
string$in
Renvoie
string

Références DES\processBlock().

◆ encryptBlock()

encryptBlock (   $in)
protected

Encrypts a block

Voir également
::encryptBlock()
::encrypt()
self::encrypt() private
Paramètres
string$in
Renvoie
string

Références DES\processBlock().

◆ isValidEngineHelper()

isValidEngineHelper (   $engine)
protected

Test for engine validity

This is mainly just a wrapper to set things up for ::isValidEngine()

Voir également
::isValidEngine()
Paramètres
int$engineprotected
Renvoie
bool

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

◆ processBlock()

processBlock (   $block,
  $mode 
)
private

Encrypts or decrypts a 64-bit block

$mode should be either self::ENCRYPT or self::DECRYPT. See Feistel.png to get a general idea of what this function does.

Voir également
self::encryptBlock()
self::decryptBlock() private
Paramètres
string$block
int$mode
Renvoie
string

Références DES\$des_rounds, $i, DES\$keys, SymmetricKey\$mode, $r, DES\$sbox1, DES\$sbox2, DES\$sbox3, DES\$sbox4, DES\$sbox5, DES\$sbox6, DES\$sbox7, et DES\$sbox8.

Référencé par DES\decryptBlock(), et DES\encryptBlock().

◆ setKey()

setKey (   $key)

Sets the key.

Keys must be 64-bits long or 8 bytes long.

DES also requires that every eighth bit be a parity bit, however, we'll ignore that.

Voir également
::setKey() public
Paramètres
string$key

Références SymmetricKey\$key, et $this.

◆ setupInlineCrypt()

setupInlineCrypt ( )
protected

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

Voir également
::setupInlineCrypt() private

Références $c, DES\$des_rounds, $i, $r, et SymmetricKey\createInlineCryptFunction().

◆ setupKey()

setupKey ( )
protected

Creates the key schedule

Voir également
::setupKey() private

Références $c, DES\$des_rounds, $i, SymmetricKey\$key, DES\$keys, et $r.

Documentation des champs

◆ $block_size

$block_size = 8
protected

◆ $cfb_init_len

$cfb_init_len = 500
protected

◆ $cipher_name_mcrypt

$cipher_name_mcrypt = 'des'
protected

◆ $des_rounds

$des_rounds = 1
protected

◆ $invipmap

$invipmap
staticprotected

◆ $ipmap

$ipmap
staticprotected

◆ $key_length

$key_length = 8
protected

◆ $key_length_max

$key_length_max = 8
protected

◆ $keys

$keys
private

Référencé par DES\processBlock(), et DES\setupKey().

◆ $openssl_mode_names

$openssl_mode_names
protected
Valeur initiale :
= [
self::MODE_ECB => 'des-ecb'

◆ $sbox1

$sbox1
staticprotected
Valeur initiale :
= [
0x00808200, 0x00000000, 0x00008000, 0x00808202,
0x00808002, 0x00008202, 0x00000002, 0x00008000,
0x00000200, 0x00808200, 0x00808202, 0x00000200,
0x00800202, 0x00808002, 0x00800000, 0x00000002,
0x00000202, 0x00800200, 0x00800200, 0x00008200,
0x00008200, 0x00808000, 0x00808000, 0x00800202,
0x00008002, 0x00800002, 0x00800002, 0x00008002,
0x00000000, 0x00000202, 0x00008202, 0x00800000,
0x00008000, 0x00808202, 0x00000002, 0x00808000,
0x00808200, 0x00800000, 0x00800000, 0x00000200,
0x00808002, 0x00008000, 0x00008200, 0x00800002,
0x00000200, 0x00000002, 0x00800202, 0x00008202,
0x00808202, 0x00008002, 0x00808000, 0x00800202,
0x00800002, 0x00000202, 0x00008202, 0x00808200,
0x00000202, 0x00800200, 0x00800200, 0x00000000,
0x00008002, 0x00008200, 0x00000000, 0x00808002
]

Référencé par DES\processBlock().

◆ $sbox2

$sbox2
staticprotected
Valeur initiale :
= [
0x40084010, 0x40004000, 0x00004000, 0x00084010,
0x00080000, 0x00000010, 0x40080010, 0x40004010,
0x40000010, 0x40084010, 0x40084000, 0x40000000,
0x40004000, 0x00080000, 0x00000010, 0x40080010,
0x00084000, 0x00080010, 0x40004010, 0x00000000,
0x40000000, 0x00004000, 0x00084010, 0x40080000,
0x00080010, 0x40000010, 0x00000000, 0x00084000,
0x00004010, 0x40084000, 0x40080000, 0x00004010,
0x00000000, 0x00084010, 0x40080010, 0x00080000,
0x40004010, 0x40080000, 0x40084000, 0x00004000,
0x40080000, 0x40004000, 0x00000010, 0x40084010,
0x00084010, 0x00000010, 0x00004000, 0x40000000,
0x00004010, 0x40084000, 0x00080000, 0x40000010,
0x00080010, 0x40004010, 0x40000010, 0x00080010,
0x00084000, 0x00000000, 0x40004000, 0x00004010,
0x40000000, 0x40080010, 0x40084010, 0x00084000
]

Référencé par DES\processBlock().

◆ $sbox3

$sbox3
staticprotected
Valeur initiale :
= [
0x00000104, 0x04010100, 0x00000000, 0x04010004,
0x04000100, 0x00000000, 0x00010104, 0x04000100,
0x00010004, 0x04000004, 0x04000004, 0x00010000,
0x04010104, 0x00010004, 0x04010000, 0x00000104,
0x04000000, 0x00000004, 0x04010100, 0x00000100,
0x00010100, 0x04010000, 0x04010004, 0x00010104,
0x04000104, 0x00010100, 0x00010000, 0x04000104,
0x00000004, 0x04010104, 0x00000100, 0x04000000,
0x04010100, 0x04000000, 0x00010004, 0x00000104,
0x00010000, 0x04010100, 0x04000100, 0x00000000,
0x00000100, 0x00010004, 0x04010104, 0x04000100,
0x04000004, 0x00000100, 0x00000000, 0x04010004,
0x04000104, 0x00010000, 0x04000000, 0x04010104,
0x00000004, 0x00010104, 0x00010100, 0x04000004,
0x04010000, 0x04000104, 0x00000104, 0x04010000,
0x00010104, 0x00000004, 0x04010004, 0x00010100
]

Référencé par DES\processBlock().

◆ $sbox4

$sbox4
staticprotected
Valeur initiale :
= [
0x80401000, 0x80001040, 0x80001040, 0x00000040,
0x00401040, 0x80400040, 0x80400000, 0x80001000,
0x00000000, 0x00401000, 0x00401000, 0x80401040,
0x80000040, 0x00000000, 0x00400040, 0x80400000,
0x80000000, 0x00001000, 0x00400000, 0x80401000,
0x00000040, 0x00400000, 0x80001000, 0x00001040,
0x80400040, 0x80000000, 0x00001040, 0x00400040,
0x00001000, 0x00401040, 0x80401040, 0x80000040,
0x00400040, 0x80400000, 0x00401000, 0x80401040,
0x80000040, 0x00000000, 0x00000000, 0x00401000,
0x00001040, 0x00400040, 0x80400040, 0x80000000,
0x80401000, 0x80001040, 0x80001040, 0x00000040,
0x80401040, 0x80000040, 0x80000000, 0x00001000,
0x80400000, 0x80001000, 0x00401040, 0x80400040,
0x80001000, 0x00001040, 0x00400000, 0x80401000,
0x00000040, 0x00400000, 0x00001000, 0x00401040
]

Référencé par DES\processBlock().

◆ $sbox5

$sbox5
staticprotected
Valeur initiale :
= [
0x00000080, 0x01040080, 0x01040000, 0x21000080,
0x00040000, 0x00000080, 0x20000000, 0x01040000,
0x20040080, 0x00040000, 0x01000080, 0x20040080,
0x21000080, 0x21040000, 0x00040080, 0x20000000,
0x01000000, 0x20040000, 0x20040000, 0x00000000,
0x20000080, 0x21040080, 0x21040080, 0x01000080,
0x21040000, 0x20000080, 0x00000000, 0x21000000,
0x01040080, 0x01000000, 0x21000000, 0x00040080,
0x00040000, 0x21000080, 0x00000080, 0x01000000,
0x20000000, 0x01040000, 0x21000080, 0x20040080,
0x01000080, 0x20000000, 0x21040000, 0x01040080,
0x20040080, 0x00000080, 0x01000000, 0x21040000,
0x21040080, 0x00040080, 0x21000000, 0x21040080,
0x01040000, 0x00000000, 0x20040000, 0x21000000,
0x00040080, 0x01000080, 0x20000080, 0x00040000,
0x00000000, 0x20040000, 0x01040080, 0x20000080
]

Référencé par DES\processBlock().

◆ $sbox6

$sbox6
staticprotected
Valeur initiale :
= [
0x10000008, 0x10200000, 0x00002000, 0x10202008,
0x10200000, 0x00000008, 0x10202008, 0x00200000,
0x10002000, 0x00202008, 0x00200000, 0x10000008,
0x00200008, 0x10002000, 0x10000000, 0x00002008,
0x00000000, 0x00200008, 0x10002008, 0x00002000,
0x00202000, 0x10002008, 0x00000008, 0x10200008,
0x10200008, 0x00000000, 0x00202008, 0x10202000,
0x00002008, 0x00202000, 0x10202000, 0x10000000,
0x10002000, 0x00000008, 0x10200008, 0x00202000,
0x10202008, 0x00200000, 0x00002008, 0x10000008,
0x00200000, 0x10002000, 0x10000000, 0x00002008,
0x10000008, 0x10202008, 0x00202000, 0x10200000,
0x00202008, 0x10202000, 0x00000000, 0x10200008,
0x00000008, 0x00002000, 0x10200000, 0x00202008,
0x00002000, 0x00200008, 0x10002008, 0x00000000,
0x10202000, 0x10000000, 0x00200008, 0x10002008
]

Référencé par DES\processBlock().

◆ $sbox7

$sbox7
staticprotected
Valeur initiale :
= [
0x00100000, 0x02100001, 0x02000401, 0x00000000,
0x00000400, 0x02000401, 0x00100401, 0x02100400,
0x02100401, 0x00100000, 0x00000000, 0x02000001,
0x00000001, 0x02000000, 0x02100001, 0x00000401,
0x02000400, 0x00100401, 0x00100001, 0x02000400,
0x02000001, 0x02100000, 0x02100400, 0x00100001,
0x02100000, 0x00000400, 0x00000401, 0x02100401,
0x00100400, 0x00000001, 0x02000000, 0x00100400,
0x02000000, 0x00100400, 0x00100000, 0x02000401,
0x02000401, 0x02100001, 0x02100001, 0x00000001,
0x00100001, 0x02000000, 0x02000400, 0x00100000,
0x02100400, 0x00000401, 0x00100401, 0x02100400,
0x00000401, 0x02000001, 0x02100401, 0x02100000,
0x00100400, 0x00000000, 0x00000001, 0x02100401,
0x00000000, 0x00100401, 0x02100000, 0x00000400,
0x02000001, 0x02000400, 0x00000400, 0x00100001
]

Référencé par DES\processBlock().

◆ $sbox8

$sbox8
staticprotected
Valeur initiale :
= [
0x08000820, 0x00000800, 0x00020000, 0x08020820,
0x08000000, 0x08000820, 0x00000020, 0x08000000,
0x00020020, 0x08020000, 0x08020820, 0x00020800,
0x08020800, 0x00020820, 0x00000800, 0x00000020,
0x08020000, 0x08000020, 0x08000800, 0x00000820,
0x00020800, 0x00020020, 0x08020020, 0x08020800,
0x00000820, 0x00000000, 0x00000000, 0x08020020,
0x08000020, 0x08000800, 0x00020820, 0x00020000,
0x00020820, 0x00020000, 0x08020800, 0x00000800,
0x00000020, 0x08020020, 0x00000800, 0x00020820,
0x08000800, 0x00000020, 0x08000020, 0x08020000,
0x08020020, 0x08000000, 0x00020000, 0x08000820,
0x00000000, 0x08020820, 0x00020020, 0x08000020,
0x08020000, 0x08000800, 0x08000820, 0x00000000,
0x08020820, 0x00020800, 0x00020800, 0x00000820,
0x00000820, 0x00020020, 0x08000000, 0x08020800
]

Référencé par DES\processBlock().

◆ $shuffle

$shuffle
staticprotected

◆ DECRYPT

const DECRYPT = 1

Contains $keys[self::DECRYPT]

private

Voir également
::setupKey()
::processBlock()

◆ ENCRYPT

const ENCRYPT = 0

Contains $keys[self::ENCRYPT]

private

Voir également
::setupKey()
::processBlock()

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