mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-26 11:37:33 +00:00
RSA: code cleanup
This commit is contained in:
parent
06ed64ef3d
commit
c12500cace
@ -794,11 +794,7 @@ class RSA
|
||||
return false;
|
||||
}
|
||||
|
||||
$oldFormat = $this->privateKeyFormat;
|
||||
$this->privateKeyFormat = $type;
|
||||
$temp = $type::savePrivateKey($this->modulus, $this->publicExponent, $this->exponent, $this->primes, $this->exponents, $this->coefficients, $this->password);
|
||||
$this->privateKeyFormat = $oldFormat;
|
||||
return $temp;
|
||||
return $type::savePrivateKey($this->modulus, $this->publicExponent, $this->exponent, $this->primes, $this->exponents, $this->coefficients, $this->password);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -969,11 +965,7 @@ class RSA
|
||||
return false;
|
||||
}
|
||||
|
||||
$oldFormat = $this->publicKeyFormat;
|
||||
$this->publicKeyFormat = $type;
|
||||
$temp = $type::savePublicKey($this->modulus, $this->publicExponent);
|
||||
$this->publicKeyFormat = $oldFormat;
|
||||
return $temp;
|
||||
return $type::savePublicKey($this->modulus, $this->publicExponent);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1161,9 +1153,9 @@ class RSA
|
||||
/**
|
||||
* Determines the private key format
|
||||
*
|
||||
* @see self::createKey()
|
||||
* @see self::__toString()
|
||||
* @access public
|
||||
* @param int $format
|
||||
* @param string $format
|
||||
*/
|
||||
function setPrivateKeyFormat($format)
|
||||
{
|
||||
@ -1173,9 +1165,9 @@ class RSA
|
||||
/**
|
||||
* Determines the public key format
|
||||
*
|
||||
* @see self::createKey()
|
||||
* @see self::__toString()
|
||||
* @access public
|
||||
* @param int $format
|
||||
* @param string $format
|
||||
*/
|
||||
function setPublicKeyFormat($format)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user