mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-14 09:24:07 +00:00
Merge branch '3.0'
This commit is contained in:
commit
726264bafa
@ -292,6 +292,9 @@ abstract class DSA extends AsymmetricKey
|
||||
*/
|
||||
public function getEngine()
|
||||
{
|
||||
if (!isset(self::$engines['PHP'])) {
|
||||
self::useBestEngine();
|
||||
}
|
||||
return self::$engines['OpenSSL'] && in_array($this->hash->getHash(), openssl_get_md_methods()) ?
|
||||
'OpenSSL' : 'PHP';
|
||||
}
|
||||
|
@ -323,6 +323,9 @@ abstract class EC extends AsymmetricKey
|
||||
*/
|
||||
public function getEngine()
|
||||
{
|
||||
if (!isset(self::$engines['PHP'])) {
|
||||
self::useBestEngine();
|
||||
}
|
||||
if ($this->curve instanceof TwistedEdwardsCurve) {
|
||||
return $this->curve instanceof Ed25519 && self::$engines['libsodium'] && !isset($this->context) ?
|
||||
'libsodium' : 'PHP';
|
||||
|
Loading…
Reference in New Issue
Block a user