ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Public Member Functions | |
isValidEngine ($engine) | |
Test for engine validity. More... | |
setKeyLength ($length) | |
Sets the key length. More... | |
getKeyLength () | |
Returns the current key length. More... | |
setKey ($key, $t1=0) | |
Sets the key. More... | |
encrypt ($plaintext) | |
Encrypts a message. More... | |
decrypt ($ciphertext) | |
Decrypts a message. More... | |
_encryptBlock ($in) | |
Encrypts a block. More... | |
_decryptBlock ($in) | |
Decrypts a block. More... | |
_setupMcrypt () | |
Setup the ::ENGINE_MCRYPT $engine. More... | |
_setupKey () | |
Creates the key schedule. More... | |
_setupInlineCrypt () | |
Setup the performance-optimized function for de/encrypt() More... | |
![]() | |
__construct ($mode=self::MODE_CBC) | |
Default Constructor. More... | |
setIV ($iv) | |
Sets the initialization vector. More... | |
setKeyLength ($length) | |
Sets the key length. More... | |
getKeyLength () | |
Returns the current key length in bits. More... | |
getBlockLength () | |
Returns the current block length in bits. More... | |
setKey ($key) | |
Sets the key. More... | |
setPassword ($password, $method='pbkdf2') | |
Sets the password. More... | |
encrypt ($plaintext) | |
Encrypts a message. More... | |
decrypt ($ciphertext) | |
Decrypts a message. More... | |
_openssl_ctr_process ($plaintext, &$encryptIV, &$buffer) | |
OpenSSL CTR Processor. More... | |
_openssl_ofb_process ($plaintext, &$encryptIV, &$buffer) | |
OpenSSL OFB Processor. More... | |
_openssl_translate_mode () | |
phpseclib <-> OpenSSL Mode Mapper More... | |
enablePadding () | |
Pad "packets". More... | |
disablePadding () | |
Do not pad packets. More... | |
enableContinuousBuffer () | |
Treat consecutive "packets" as if they are a continuous buffer. More... | |
disableContinuousBuffer () | |
Treat consecutive packets as if they are a discontinuous buffer. More... | |
isValidEngine ($engine) | |
Test for engine validity. More... | |
setPreferredEngine ($engine) | |
Sets the preferred crypt engine. More... | |
getEngine () | |
Returns the engine currently being utilized. More... | |
_setEngine () | |
Sets the engine as appropriate. More... | |
_encryptBlock ($in) | |
Encrypts a block. More... | |
_decryptBlock ($in) | |
Decrypts a block. More... | |
_setupKey () | |
Setup the key (expansion) More... | |
_setup () | |
Setup the self::ENGINE_INTERNAL $engine. More... | |
_setupMcrypt () | |
Setup the self::ENGINE_MCRYPT $engine. More... | |
_pad ($text) | |
Pads a string. More... | |
_unpad ($text) | |
Unpads a string. More... | |
_clearBuffers () | |
Clears internal buffers. More... | |
_string_shift (&$string, $index=1) | |
String Shift. More... | |
_string_pop (&$string, $index=1) | |
String Pop. More... | |
_increment_str (&$var) | |
Increment the current string. More... | |
_setupInlineCrypt () | |
Setup the performance-optimized function for de/encrypt() More... | |
_createInlineCryptFunction ($cipher_code) | |
Creates the performance-optimized function for en/decrypt() More... | |
& | _getLambdaFunctions () |
Holds the lambda_functions table (classwide) More... | |
_hashInlineCryptFunction ($bytes) | |
Generates a digest from $bytes. More... | |
Data Fields | |
$block_size = 8 | |
$key | |
$orig_key | |
$skip_key_adjustment = true | |
$key_length = 16 | |
$cipher_name_mcrypt = 'rc2' | |
$cfb_init_len = 500 | |
$default_key_length = 1024 | |
$current_key_length | |
$keys | |
$pitable | |
$invpitable | |
![]() | |
const | MODE_CTR = -1 |
#+ public More... | |
const | MODE_ECB = 1 |
Encrypt / decrypt using the Electronic Code Book mode. More... | |
const | MODE_CBC = 2 |
Encrypt / decrypt using the Code Book Chaining mode. More... | |
const | MODE_CFB = 3 |
Encrypt / decrypt using the Cipher Feedback mode. More... | |
const | MODE_OFB = 4 |
Encrypt / decrypt using the Output Feedback mode. More... | |
const | MODE_STREAM = 5 |
Encrypt / decrypt using streaming mode. More... | |
const | ENGINE_INTERNAL = 1 |
#+ private More... | |
const | ENGINE_MCRYPT = 2 |
Base value for the mcrypt implementation $engine switch. More... | |
const | ENGINE_OPENSSL = 3 |
Base value for the mcrypt implementation $engine switch. More... | |
$mode | |
$block_size = 16 | |
$key = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | |
$iv | |
$encryptIV | |
$decryptIV | |
$continuousBuffer = false | |
$enbuffer | |
$debuffer | |
$enmcrypt | |
$demcrypt | |
$enchanged = true | |
$dechanged = true | |
$ecb | |
$cfb_init_len = 600 | |
$changed = true | |
$padding = true | |
$paddable = false | |
$engine | |
$preferredEngine | |
$cipher_name_mcrypt | |
$cipher_name_openssl | |
$cipher_name_openssl_ecb | |
$password_default_salt = 'phpseclib/salt' | |
$inline_crypt | |
$use_inline_crypt | |
$openssl_emulate_ctr = false | |
$openssl_options | |
$explicit_key_length = false | |
$skip_key_adjustment = false | |
Additional Inherited Members | |
![]() | |
static | $WHIRLPOOL_AVAILABLE |
phpseclib\Crypt\RC2::_decryptBlock | ( | $in | ) |
Decrypts a block.
string | $in |
Definition at line 475 of file RC2.php.
References $in, and phpseclib\Crypt\RC2\$keys.
phpseclib\Crypt\RC2::_encryptBlock | ( | $in | ) |
Encrypts a block.
string | $in |
Definition at line 430 of file RC2.php.
References $in, and phpseclib\Crypt\RC2\$keys.
phpseclib\Crypt\RC2::_setupInlineCrypt | ( | ) |
Setup the performance-optimized function for de/encrypt()
Definition at line 553 of file RC2.php.
References phpseclib\Crypt\RC2\$keys, phpseclib\Crypt\Base\_createInlineCryptFunction(), and phpseclib\Crypt\Base\_hashInlineCryptFunction().
phpseclib\Crypt\RC2::_setupKey | ( | ) |
Creates the key schedule.
Definition at line 532 of file RC2.php.
References $l, and phpseclib\Crypt\RC2\setKey().
phpseclib\Crypt\RC2::_setupMcrypt | ( | ) |
Setup the ::ENGINE_MCRYPT $engine.
Definition at line 517 of file RC2.php.
References phpseclib\Crypt\RC2\setKey().
phpseclib\Crypt\RC2::decrypt | ( | $ciphertext | ) |
Decrypts a message.
Mostly a wrapper for ::decrypt, with some additional OpenSSL handling code
string | $ciphertext |
Definition at line 408 of file RC2.php.
References phpseclib\Crypt\RC2\$key, phpseclib\Crypt\RC2\$orig_key, and $result.
phpseclib\Crypt\RC2::encrypt | ( | $plaintext | ) |
Encrypts a message.
Mostly a wrapper for ::encrypt, with some additional OpenSSL handling code
string | $plaintext |
Definition at line 385 of file RC2.php.
References phpseclib\Crypt\RC2\$key, phpseclib\Crypt\RC2\$orig_key, and $result.
phpseclib\Crypt\RC2::getKeyLength | ( | ) |
Returns the current key length.
public
Definition at line 311 of file RC2.php.
References phpseclib\Crypt\RC2\$current_key_length.
phpseclib\Crypt\RC2::isValidEngine | ( | $engine | ) |
Test for engine validity.
This is mainly just a wrapper to set things up for ::isValidEngine()
int | $engine | public |
Definition at line 274 of file RC2.php.
References phpseclib\Crypt\Base\$engine, and phpseclib\Crypt\Base\_openssl_translate_mode().
phpseclib\Crypt\RC2::setKey | ( | $key, | |
$t1 = 0 |
|||
) |
Sets the key.
Keys can be of any length. RC2, itself, uses 1 to 1024 bit keys (eg. strlen($key) <= 128), however, we only use the first 128 bytes if $key has more then 128 bytes in it, and set $key to a single null byte if it is empty.
If the key is not explicitly set, it'll be assumed to be a single null byte.
string | $key | |
int | $t1 | optional Effective key length in bits. |
Definition at line 332 of file RC2.php.
References phpseclib\Crypt\RC2\$default_key_length, $i, phpseclib\Crypt\RC2\$key, $l, phpseclib\Crypt\RC2\$pitable, and $t.
Referenced by phpseclib\Crypt\RC2\_setupKey(), and phpseclib\Crypt\RC2\_setupMcrypt().
phpseclib\Crypt\RC2::setKeyLength | ( | $length | ) |
Sets the key length.
Valid key lengths are 1 to 1024. Calling this function after setting the key has no effect until the next ::setKey() call.
public
int | $length | in bits |
phpseclib\Crypt\RC2::$current_key_length |
Definition at line 136 of file RC2.php.
Referenced by phpseclib\Crypt\RC2\getKeyLength().
phpseclib\Crypt\RC2::$default_key_length = 1024 |
Definition at line 125 of file RC2.php.
Referenced by phpseclib\Crypt\RC2\setKey().
phpseclib\Crypt\RC2::$key |
Definition at line 65 of file RC2.php.
Referenced by phpseclib\Crypt\RC2\decrypt(), phpseclib\Crypt\RC2\encrypt(), and phpseclib\Crypt\RC2\setKey().
phpseclib\Crypt\RC2::$keys |
Definition at line 145 of file RC2.php.
Referenced by phpseclib\Crypt\RC2\_decryptBlock(), phpseclib\Crypt\RC2\_encryptBlock(), and phpseclib\Crypt\RC2\_setupInlineCrypt().
phpseclib\Crypt\RC2::$orig_key |
Definition at line 77 of file RC2.php.
Referenced by phpseclib\Crypt\RC2\decrypt(), and phpseclib\Crypt\RC2\encrypt().
phpseclib\Crypt\RC2::$pitable |
Definition at line 155 of file RC2.php.
Referenced by phpseclib\Crypt\RC2\setKey().