Skip to content

Getting Instance of 'UntrustedIdentityException' issue while decrypting the message #83

@saty-a

Description

@saty-a

Future<String?> getDecryptedText(String source, String msg) async {
try {
SessionCipher session = SessionCipher.fromStore(signalStore,
SignalProtocolAddress(source, SignalHelper.defaultDeviceId));
Map data = jsonDecode(msg);
if (data["type"] == CiphertextMessage.prekeyType) {
PreKeySignalMessage pre =
PreKeySignalMessage(base64Decode(data["msg"]));
Uint8List plaintext = await session.decrypt(pre);
String dectext = utf8.decode(plaintext);
log("type $dectext");
return dectext;
} else {
return null;
}
} catch (e) {
log(e.toString());
return null;
}
} while running this I'm getting this issue: Instance of 'UntrustedIdentityException'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions