mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-02-15 10:01:39 +00:00
tweak comments
This commit is contained in:
parent
a95abeb4c4
commit
a699dadb03
@ -3,7 +3,7 @@
|
||||
/**
|
||||
* Pure-PHP implementation of AES.
|
||||
*
|
||||
* Uses an internal implementation.
|
||||
* Uses OpenSSL, if available/possible, and an internal implementation, otherwise
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
|
@ -3,7 +3,7 @@
|
||||
/**
|
||||
* Pure-PHP implementation of DES.
|
||||
*
|
||||
* Uses an internal implementation.
|
||||
* Uses OpenSSL, if available/possible, and an internal implementation, otherwise
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
|
@ -3,7 +3,7 @@
|
||||
/**
|
||||
* Pure-PHP implementation of RC2.
|
||||
*
|
||||
* Uses an internal implementation.
|
||||
* Uses OpenSSL, if available/possible, and an internal implementation, otherwise
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
@ -319,6 +319,12 @@ class RC2 extends BlockCipher
|
||||
|
||||
$t = strlen($key);
|
||||
|
||||
// The mcrypt RC2 implementation only supports effective key length
|
||||
// of 1024 bits. It is however possible to handle effective key
|
||||
// lengths in range 1..1024 by expanding the key and applying
|
||||
// inverse pitable mapping to the first byte before submitting it
|
||||
// to mcrypt.
|
||||
|
||||
// Key expansion.
|
||||
$l = array_values(unpack('C*', $key));
|
||||
$t8 = ($t1 + 7) >> 3;
|
||||
|
@ -3,7 +3,7 @@
|
||||
/**
|
||||
* Pure-PHP implementation of RC4.
|
||||
*
|
||||
* Uses an internal implementation.
|
||||
* Uses OpenSSL, if available/possible, and an internal implementation, otherwise
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
|
@ -3,7 +3,7 @@
|
||||
/**
|
||||
* Pure-PHP implementation of Rijndael.
|
||||
*
|
||||
* Uses an internal implementation.
|
||||
* Uses OpenSSL, if available/possible, and an internal implementation, otherwise
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
|
@ -3,7 +3,9 @@
|
||||
/**
|
||||
* Pure-PHP implementation of Triple DES.
|
||||
*
|
||||
* Uses an internal implementation. Operates in the EDE3 mode (encrypt-decrypt-encrypt).
|
||||
* Uses OpenSSL, if available/possible, and an internal implementation, otherwise.
|
||||
*
|
||||
* Operates in the EDE3 mode (encrypt-decrypt-encrypt).
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
@ -369,7 +371,7 @@ class TripleDES extends DES
|
||||
{
|
||||
switch (true) {
|
||||
// if $key <= 64bits we configure our internal pure-php cipher engine
|
||||
// to act as regular [1]DES, not as 3DES.
|
||||
// to act as regular [1]DES, not as 3DES. mcrypt.so::tripledes does the same.
|
||||
case strlen($this->key) <= 8:
|
||||
$this->des_rounds = 1;
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user