Commit 67e70945 authored by Him188's avatar Him188

Fix recursive call

parent 7a6a5896
...@@ -40,7 +40,11 @@ actual class ECDH actual constructor(actual val keyPair: ECDHKeyPair) { ...@@ -40,7 +40,11 @@ actual class ECDH actual constructor(actual val keyPair: ECDHKeyPair) {
Security.removeProvider(BouncyCastleProvider.PROVIDER_NAME) Security.removeProvider(BouncyCastleProvider.PROVIDER_NAME)
} }
Security.addProvider(BouncyCastleProvider()) 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 }.isSuccess
actual val isECDHAvailable: Boolean get() = _isECDHAvailable actual val isECDHAvailable: Boolean get() = _isECDHAvailable
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment