mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-27 03:42:40 +00:00
RC4: key wasn't being truncated correctly
This commit is contained in:
parent
da36b5c91e
commit
123eee7150
@ -234,7 +234,7 @@ class Crypt_RC4 extends Crypt_Base
|
|||||||
if ($length < 8) {
|
if ($length < 8) {
|
||||||
$this->key_length = 1;
|
$this->key_length = 1;
|
||||||
} elseif ($length > 2048) {
|
} elseif ($length > 2048) {
|
||||||
$this->key_length = 248;
|
$this->key_length = 256;
|
||||||
} else {
|
} else {
|
||||||
$this->key_length = $length >> 3;
|
$this->key_length = $length >> 3;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user