fix bad merge

This commit is contained in:
terrafrost 2022-07-28 16:59:50 -05:00
parent 11977eeb3c
commit abb6a62384
3 changed files with 3 additions and 27 deletions

View File

@ -536,19 +536,6 @@ abstract class Base
}
}
/**
* PHP4 compatible Default Constructor.
*
* @see self::__construct()
* @param int $mode
* @access public
*/
function Crypt_Base($mode = CRYPT_MODE_CBC)
{
$this->__construct($mode);
>>>>>>> bcrypt
}
/**
* Sets the initialization vector. (optional)
*
@ -658,10 +645,6 @@ abstract class Base
switch ($method) {
case 'bcrypt':
if (!class_exists('Crypt_Blowfish')) {
include_once 'Crypt/Blowfish.php';
}
$func_args = func_get_args();
if (!isset($func_args[2])) {
@ -673,7 +656,7 @@ abstract class Base
$rounds = isset($func_args[3]) ? $func_args[3] : 16;
$keylen = isset($func_args[4]) ? $func_args[4] : $this->key_length;
$bf = new Crypt_Blowfish();
$bf = new Blowfish();
$key = $bf->bcrypt_pbkdf($password, $salt, $keylen + $this->block_size, $rounds);
if (!$key) {
return false;

View File

@ -532,12 +532,8 @@ class Blowfish extends Base
return false;
}
if (!class_exists('Crypt_Hash')) {
include_once 'Crypt/Hash.php';
}
if (!isset($this->sha512)) {
$this->sha512 = new Crypt_Hash('sha512');
$this->sha512 = new Hash('sha512');
}
$sha2pass = $this->sha512->hash($pass);

View File

@ -1555,10 +1555,7 @@ class RSA
}
$salt = $this->_string_shift($kdfoptions, $length);
extract(unpack('Nrounds', $this->_string_shift($kdfoptions, 4)));
if (!class_exists('Crypt_AES')) {
include_once 'Crypt/AES.php';
}
$crypto = new Crypt_AES(CRYPT_MODE_CTR);
$crypto = new AES(AES::MODE_CTR);
$crypto->disablePadding();
if (!$crypto->setPassword($this->password, 'bcrypt', $salt, $rounds, 32)) {
return false;