tweak comments

This commit is contained in:
terrafrost 2022-07-22 19:16:04 -05:00
parent a95abeb4c4
commit a699dadb03
6 changed files with 15 additions and 7 deletions

View File

@ -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
*

View File

@ -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
*

View File

@ -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;

View File

@ -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
*

View File

@ -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
*

View File

@ -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;