Commit 606879cb authored by Him188's avatar Him188

Test ECDH keyPair before success

parent 8b24b08c
......@@ -46,6 +46,7 @@ actual class ECDH actual constructor(actual val keyPair: ECDHKeyPair) {
init {
if (kotlin.runCatching {
Security.addProvider(BouncyCastleProvider())
generateKeyPair() // try if it is working
}.exceptionOrNull() == null) {
isECDHAvailable = true
}
......
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