fix: Update decryption key variable from myPrivateKey to privateKey in attachment functions
This commit is contained in:
@@ -194,7 +194,7 @@ fun ImageAttachment(
|
|||||||
|
|
||||||
// КРИТИЧНО: chachaKey ЗАШИФРОВАН в БД (как в Desktop)
|
// КРИТИЧНО: chachaKey ЗАШИФРОВАН в БД (как в Desktop)
|
||||||
// Сначала расшифровываем его: Buffer.from(await decrypt(message.chacha_key, privatePlain), "binary").toString('utf-8')
|
// Сначала расшифровываем его: Buffer.from(await decrypt(message.chacha_key, privatePlain), "binary").toString('utf-8')
|
||||||
val decryptedKeyAndNonce = MessageCrypto.decryptKeyFromSender(chachaKey, myPrivateKey)
|
val decryptedKeyAndNonce = MessageCrypto.decryptKeyFromSender(chachaKey, privateKey)
|
||||||
val decryptKeyString = String(decryptedKeyAndNonce, Charsets.UTF_8)
|
val decryptKeyString = String(decryptedKeyAndNonce, Charsets.UTF_8)
|
||||||
Log.d(TAG, "🔑 Decrypted chacha_key: ${decryptKeyString.length} chars")
|
Log.d(TAG, "🔑 Decrypted chacha_key: ${decryptKeyString.length} chars")
|
||||||
|
|
||||||
@@ -397,7 +397,7 @@ fun FileAttachment(
|
|||||||
|
|
||||||
// КРИТИЧНО: chachaKey ЗАШИФРОВАН в БД (как в Desktop)
|
// КРИТИЧНО: chachaKey ЗАШИФРОВАН в БД (как в Desktop)
|
||||||
// Сначала расшифровываем его
|
// Сначала расшифровываем его
|
||||||
val decryptedKeyAndNonce = MessageCrypto.decryptKeyFromSender(chachaKey, myPrivateKey)
|
val decryptedKeyAndNonce = MessageCrypto.decryptKeyFromSender(chachaKey, privateKey)
|
||||||
val decryptKeyString = String(decryptedKeyAndNonce, Charsets.UTF_8)
|
val decryptKeyString = String(decryptedKeyAndNonce, Charsets.UTF_8)
|
||||||
|
|
||||||
val decrypted = MessageCrypto.decryptAttachmentBlobWithPassword(
|
val decrypted = MessageCrypto.decryptAttachmentBlobWithPassword(
|
||||||
@@ -592,7 +592,7 @@ fun AvatarAttachment(
|
|||||||
|
|
||||||
// КРИТИЧНО: chachaKey ЗАШИФРОВАН в БД (как в Desktop)
|
// КРИТИЧНО: chachaKey ЗАШИФРОВАН в БД (как в Desktop)
|
||||||
// Сначала расшифровываем его
|
// Сначала расшифровываем его
|
||||||
val decryptedKeyAndNonce = MessageCrypto.decryptKeyFromSender(chachaKey, myPrivateKey)
|
val decryptedKeyAndNonce = MessageCrypto.decryptKeyFromSender(chachaKey, privateKey)
|
||||||
val decryptKeyString = String(decryptedKeyAndNonce, Charsets.UTF_8)
|
val decryptKeyString = String(decryptedKeyAndNonce, Charsets.UTF_8)
|
||||||
|
|
||||||
val decrypted = MessageCrypto.decryptAttachmentBlobWithPassword(
|
val decrypted = MessageCrypto.decryptAttachmentBlobWithPassword(
|
||||||
|
|||||||
Reference in New Issue
Block a user