628
628
DecryptedMessage decrypted = mDecrypter.decryptEncryptedData(encrypted.randomId(), encrypted.bytes());
629
629
secretChatMessage.setDecryptedMessage(decrypted);
632
631
// if having a not 0 randomId, the decrypted message is valid
633
632
if (decrypted.randomId()) {
634
636
//if attachment, check keyFingerprint
635
637
if (attachment.classType() != EncryptedFile::typeEncryptedFileEmpty) {
636
639
qint32 receivedKeyFingerprint = attachment.keyFingerprint();
637
640
const QByteArray &key = decrypted.media().key();
638
641
const QByteArray &iv = decrypted.media().iv();