mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-25 11:20:03 +00:00
Crypt: CS adjustments
This commit is contained in:
parent
8476ae6383
commit
866b690248
@ -1322,7 +1322,7 @@ class Crypt_Base
|
||||
$buffer['encrypted'] = substr($encryptIV, $overflow);
|
||||
} else if (!strlen($buffer['encrypted'])) {
|
||||
$ciphertext.= openssl_encrypt($plaintext . str_repeat("\0", $block_size), $this->cipher_name_openssl, $key, $this->openssl_options, $encryptIV);
|
||||
$encryptIV = $this->_string_pop($ciphertext, $block_size);
|
||||
$encryptIV = $this->_string_pop($ciphertext, $block_size);
|
||||
}
|
||||
$encryptIV = openssl_decrypt($encryptIV, $this->cipher_name_openssl_ecb, $key, $this->openssl_options);
|
||||
if ($overflow) {
|
||||
@ -1522,8 +1522,8 @@ class Crypt_Base
|
||||
switch ($engine) {
|
||||
case CRYPT_MODE_OPENSSL:
|
||||
$this->openssl_emulate_ctr = false;
|
||||
$result = $this->cipher_name_openssl &&
|
||||
extension_loaded('openssl') &&
|
||||
$result = $this->cipher_name_openssl &&
|
||||
extension_loaded('openssl') &&
|
||||
version_compare(PHP_VERSION, '5.3.0');
|
||||
if (!$result) {
|
||||
return false;
|
||||
|
@ -957,7 +957,7 @@ class Crypt_Rijndael extends Crypt_Base
|
||||
// (Currently, for Crypt_Rijndael/AES, one generated $lambda_function cost on php5.5@32bit ~80kb unfreeable mem and ~130kb on php5.5@64bit)
|
||||
// After that, we'll still create very fast optimized code but not the hi-ultimative code, for each $mode one.
|
||||
$gen_hi_opt_code = (bool)( count($lambda_functions) < 10 );
|
||||
|
||||
|
||||
// Generation of a uniqe hash for our generated code
|
||||
$code_hash = "Crypt_Rijndael, {$this->mode}, {$this->Nr}, {$this->Nb}";
|
||||
if ($gen_hi_opt_code) {
|
||||
|
Loading…
Reference in New Issue
Block a user