pull/396/head
nielsandriesse 4 years ago
parent deb301e5b7
commit 95d3311fac

@ -38,7 +38,7 @@ NS_ASSUME_NONNULL_BEGIN
// See comments in `OWSBackupIO`.
@property (nonatomic, nullable) NSNumber *uncompressedDataLength;
- (instancetype)init NS_UNAVAILABLE;
- (instancetype)init;
@end

@ -126,7 +126,7 @@ public final class AttachmentDownloadJob : NSObject, Job, NSCoding { // NSObject
return failureHandler(error)
}
let plaintext: Data
if let key = pointer.encryptionKey, let digest = pointer.digest {
if let key = pointer.encryptionKey, let digest = pointer.digest, key.count > 0 && digest.count > 0 {
do {
plaintext = try Cryptography.decryptAttachment(data, withKey: key, digest: digest, unpaddedSize: pointer.byteCount)
} catch {

Loading…
Cancel
Save