mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-09 18:00:33 +08:00
Simplify
This commit is contained in:
parent
f0e0ae0323
commit
b3c97c1678
@ -47,7 +47,7 @@ actual class ECDH actual constructor(actual val keyPair: ECDHKeyPair) {
|
|||||||
if (kotlin.runCatching {
|
if (kotlin.runCatching {
|
||||||
Security.addProvider(BouncyCastleProvider())
|
Security.addProvider(BouncyCastleProvider())
|
||||||
generateKeyPair() // try if it is working
|
generateKeyPair() // try if it is working
|
||||||
}.exceptionOrNull() == null) {
|
}.isSuccess) {
|
||||||
isECDHAvailable = true
|
isECDHAvailable = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user