From aaa0d736ed673139a008ab2d6cba992b64766052 Mon Sep 17 00:00:00 2001 From: Niels Andriesse Date: Tue, 2 Mar 2021 11:05:40 +1100 Subject: [PATCH] Fix desktop attachment compatibility --- SessionMessagingKit/Utilities/DotNetAPI.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SessionMessagingKit/Utilities/DotNetAPI.swift b/SessionMessagingKit/Utilities/DotNetAPI.swift index 6b0a9cfce..2ef017a8e 100644 --- a/SessionMessagingKit/Utilities/DotNetAPI.swift +++ b/SessionMessagingKit/Utilities/DotNetAPI.swift @@ -157,7 +157,7 @@ public class DotNetAPI : NSObject { if isEncryptionRequired { var encryptionKey = NSData() var digest = NSData() - guard let encryptedAttachmentData = Cryptography.encryptAttachmentData(unencryptedAttachmentData, shouldPad: true, outKey: &encryptionKey, outDigest: &digest) else { + guard let encryptedAttachmentData = Cryptography.encryptAttachmentData(unencryptedAttachmentData, shouldPad: false, outKey: &encryptionKey, outDigest: &digest) else { SNLog("Couldn't encrypt attachment.") return seal.reject(Error.encryptionFailed) }