mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-13 00:46:31 +00: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 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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user