Make attachment padding consistent cross-platform

pull/406/head
Niels Andriesse 3 years ago
parent 90c8060b98
commit f893acfe3b

@ -97,7 +97,7 @@ public final class AttachmentUploadJob : NSObject, Job, NSCoding { // NSObject/N
if encrypt {
var encryptionKey = NSData()
var digest = NSData()
guard let ciphertext = Cryptography.encryptAttachmentData(data, shouldPad: false, outKey: &encryptionKey, outDigest: &digest) else {
guard let ciphertext = Cryptography.encryptAttachmentData(data, shouldPad: true, outKey: &encryptionKey, outDigest: &digest) else {
SNLog("Couldn't encrypt attachment.")
onFailure?(Error.encryptionFailed); return
}

Loading…
Cancel
Save