ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Public Member Functions | |
__construct () | |
Default Constructor. More... | |
isValidEngine ($engine) | |
Test for engine validity. More... | |
setIV ($iv) | |
Dummy function. More... | |
setKeyLength ($length) | |
Sets the key length. 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... | |
_setupKey () | |
Setup the key (expansion) More... | |
_crypt ($text, $mode) | |
Encrypts or decrypts a message. More... | |
Public Member Functions inherited from phpseclib\Crypt\Base | |
__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 | |
const | ENCRYPT = 0 |
#+ private More... | |
const | DECRYPT = 1 |
$block_size = 0 | |
$key_length = 128 | |
$cipher_name_mcrypt = 'arcfour' | |
$use_inline_crypt = false | |
$key = "\0" | |
$stream | |
Data Fields inherited from phpseclib\Crypt\Base | |
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 Public Attributes inherited from phpseclib\Crypt\Base | |
static | $WHIRLPOOL_AVAILABLE |
phpseclib\Crypt\RC4::__construct | ( | ) |
Default Constructor.
Determines whether or not the mcrypt extension should be used.
Definition at line 132 of file RC4.php.
References phpseclib\Crypt\Base\MODE_STREAM.
phpseclib\Crypt\RC4::_crypt | ( | $text, | |
$mode | |||
) |
Encrypts or decrypts a message.
string | $text | |
int | $mode |
Definition at line 309 of file RC4.php.
References $i, phpseclib\Crypt\Base\$mode, $text, and phpseclib\Crypt\Base\_setup().
Referenced by phpseclib\Crypt\RC4\decrypt(), and phpseclib\Crypt\RC4\encrypt().
phpseclib\Crypt\RC4::_decryptBlock | ( | $in | ) |
phpseclib\Crypt\RC4::_encryptBlock | ( | $in | ) |
phpseclib\Crypt\RC4::_setupKey | ( | ) |
Setup the key (expansion)
Definition at line 278 of file RC4.php.
References $i, and phpseclib\Crypt\RC4\$key.
phpseclib\Crypt\RC4::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 |
Definition at line 242 of file RC4.php.
References phpseclib\Crypt\RC4\_crypt(), and phpseclib\Crypt\Base\ENGINE_INTERNAL.
phpseclib\Crypt\RC4::encrypt | ( | $plaintext | ) |
Encrypts a message.
string | $plaintext |
Definition at line 222 of file RC4.php.
References phpseclib\Crypt\RC4\_crypt(), and phpseclib\Crypt\Base\ENGINE_INTERNAL.
phpseclib\Crypt\RC4::isValidEngine | ( | $engine | ) |
Test for engine validity.
This is mainly just a wrapper to set things up for ::isValidEngine()
int | $engine | public |
Definition at line 147 of file RC4.php.
References phpseclib\Crypt\Base\$engine, and phpseclib\Crypt\Base\ENGINE_OPENSSL.
phpseclib\Crypt\RC4::setIV | ( | $iv | ) |
Dummy function.
Some protocols, such as WEP, prepend an "initialization vector" to the key, effectively creating a new key [1]. If you need to use an initialization vector in this manner, feel free to prepend it to the key, yourself, before calling setKey().
[1] WEP's initialization vectors (IV's) are used in a somewhat insecure way. Since, in that protocol, the IV's are relatively easy to predict, an attack described by Scott Fluhrer, Itsik Mantin, and Adi Shamir can be used to quickly guess at the rest of the key. The following links elaborate:
http://www.rsa.com/rsalabs/node.asp?id=2009 http://en.wikipedia.org/wiki/Related_key_attack
string | $iv |
phpseclib\Crypt\RC4::setKeyLength | ( | $length | ) |
Sets the key length.
Keys can be between 1 and 256 bytes long.
public
int | $length |
phpseclib\Crypt\RC4::$key = "\0" |
Definition at line 112 of file RC4.php.
Referenced by phpseclib\Crypt\RC4\_setupKey().
const phpseclib\Crypt\RC4::ENCRYPT = 0 |