diff --git a/submodules/TelegramCore/Sources/SecretChats/SecretChatEncryption.swift b/submodules/TelegramCore/Sources/SecretChats/SecretChatEncryption.swift index b46bcf7a00..ebcda09595 100644 --- a/submodules/TelegramCore/Sources/SecretChats/SecretChatEncryption.swift +++ b/submodules/TelegramCore/Sources/SecretChats/SecretChatEncryption.swift @@ -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 }