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