mirror of
https://github.com/mamoe/mirai.git
synced 2024-12-29 01:50:09 +08:00
Use default shareKey if ECDH is not available
This commit is contained in:
parent
680f452cae
commit
29a5ab53a9
@ -77,6 +77,7 @@ actual class ECDH actual constructor(actual val keyPair: ECDHKeyPair) {
|
||||
}
|
||||
|
||||
actual fun calculateShareKeyByPeerPublicKey(peerPublicKey: ECDHPublicKey): ByteArray {
|
||||
if (!isECDHAvailable) return keyPair.initialShareKey
|
||||
return calculateShareKey(keyPair.privateKey, peerPublicKey)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user