mirror of
https://github.com/danog/phpseclib.git
synced 2024-12-02 17:52:59 +01:00
EC: CS adjustment
This commit is contained in:
parent
dbe7daff1d
commit
60edff77e6
@ -106,7 +106,7 @@ class PrivateKey extends EC implements Common\PrivateKey
|
|||||||
|
|
||||||
if ($this->curve instanceof TwistedEdwardsCurve) {
|
if ($this->curve instanceof TwistedEdwardsCurve) {
|
||||||
if ($this->curve instanceof Ed25519 && self::$engines['libsodium'] && !isset($this->context)) {
|
if ($this->curve instanceof Ed25519 && self::$engines['libsodium'] && !isset($this->context)) {
|
||||||
$result = sodium_crypto_sign_detached($message, $this->withPassword(false)->toString('libsodium'));
|
$result = sodium_crypto_sign_detached($message, $this->withPassword()->toString('libsodium'));
|
||||||
return $shortFormat == 'SSH2' ? Strings::packSSH2('ss', 'ssh-' . strtolower($this->getCurve()), $result) : $result;
|
return $shortFormat == 'SSH2' ? Strings::packSSH2('ss', 'ssh-' . strtolower($this->getCurve()), $result) : $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user