mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-16 02:07:09 +00:00
Removed includes for Random.php and fixed up user_error message
This commit is contained in:
parent
f5ed86e385
commit
d6029bdb6a
@ -70,13 +70,6 @@
|
||||
use \phpseclib\Crypt\Random;
|
||||
use \phpseclib\Math\BigInteger;
|
||||
|
||||
/**
|
||||
* Include Crypt\Random
|
||||
*/
|
||||
if (!class_exists('phpseclib\Crypt\Random')) {
|
||||
include_once 'Random.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* Include Crypt_Hash
|
||||
*/
|
||||
|
@ -228,7 +228,7 @@ class Random
|
||||
$crypto = new Crypt_RC4();
|
||||
break;
|
||||
default:
|
||||
user_error('string requires at least one symmetric cipher be loaded');
|
||||
user_error(__CLASS__ . ' requires at least one symmetric cipher be loaded');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -520,11 +520,6 @@ class Net_SSH1
|
||||
*/
|
||||
function __construct($host, $port = 22, $timeout = 10, $cipher = NET_SSH1_CIPHER_3DES)
|
||||
{
|
||||
// Include Crypt\Random
|
||||
if (!class_exists('phpseclib\Crypt\Random')) {
|
||||
include_once 'Crypt/Random.php';
|
||||
}
|
||||
|
||||
$this->protocol_flags = array(
|
||||
1 => 'NET_SSH1_MSG_DISCONNECT',
|
||||
2 => 'NET_SSH1_SMSG_PUBLIC_KEY',
|
||||
|
@ -856,10 +856,6 @@ class Net_SSH2
|
||||
*/
|
||||
function __construct($host, $port = 22, $timeout = 10)
|
||||
{
|
||||
if (!class_exists('phpseclib\Crypt\Random')) {
|
||||
include_once 'Crypt/Random.php';
|
||||
}
|
||||
|
||||
if (!class_exists('Crypt_Hash')) {
|
||||
include_once 'Crypt/Hash.php';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user