mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-15 01:35:07 +08:00
use pkEncryption, to properly close it.
This commit is contained in:
parent
f7195a878a
commit
e89bec4f27
@ -46,7 +46,9 @@ internal object ScanEncryptorUtils {
|
||||
return if (publicServerKey != null) {
|
||||
// Note: fromBase64 can throw Exception
|
||||
val pkEncryption = PkEncryption.fromBase64(key = publicServerKey)
|
||||
val pkMessage = pkEncryption.encrypt(DownloadBody(encryptedInfo).toCanonicalJson())
|
||||
val pkMessage = pkEncryption.use {
|
||||
pkEncryption.encrypt(DownloadBody(encryptedInfo).toCanonicalJson())
|
||||
}
|
||||
DownloadBody(
|
||||
encryptedBody = EncryptedBody(
|
||||
cipherText = pkMessage.ciphertext,
|
||||
|
Loading…
Reference in New Issue
Block a user