constTimeIsEqual

This commit is contained in:
Isaac 2026-02-13 18:13:26 +04:00
parent 466de70edd
commit 9d33962c01

View file

@ -231,7 +231,7 @@ func withDecryptedMessageContents(parameters: SecretChatEncryptionParameters, da
return nil
}
if localMessageKey != msgKeyData {
if !constTimeIsEqual(data1: localMessageKey, data2: msgKeyData) {
Logger.shared.log("SecretChatEncryption", "message key doesn't match")
return nil
}