mirror of
https://github.com/mamoe/mirai.git
synced 2025-02-09 01:32:27 +08:00
Fix recursive call
This commit is contained in:
parent
7a6a5896a8
commit
67e709452a
@ -40,7 +40,11 @@ actual class ECDH actual constructor(actual val keyPair: ECDHKeyPair) {
|
||||
Security.removeProvider(BouncyCastleProvider.PROVIDER_NAME)
|
||||
}
|
||||
Security.addProvider(BouncyCastleProvider())
|
||||
generateKeyPair() // try if it is working
|
||||
ECDHKeyPairImpl(KeyPairGenerator.getInstance("ECDH")
|
||||
.also { it.initialize(ECGenParameterSpec("secp192k1")) }
|
||||
.genKeyPair()).let {
|
||||
calculateShareKey(it.privateKey, it.publicKey)
|
||||
} // try if it is working
|
||||
}.isSuccess
|
||||
|
||||
actual val isECDHAvailable: Boolean get() = _isECDHAvailable
|
||||
|
Loading…
Reference in New Issue
Block a user