File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Sources/CryptomatorCryptoLib Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -87,15 +87,15 @@ public class Cryptor {
87
87
}
88
88
89
89
public convenience init ( masterkey: Masterkey , scheme: CryptorScheme ) {
90
- let cryptoSupport = CryptoSupport ( )
91
- let contentCryptor : ContentCryptor
90
+ let defaultCryptoSupport = CryptoSupport ( )
91
+ let chosenContentCryptor : ContentCryptor
92
92
switch scheme {
93
93
case . sivCtrMac:
94
- contentCryptor = CtrThenHmacContentCryptor ( macKey: masterkey. macMasterKey, cryptoSupport: cryptoSupport )
94
+ chosenContentCryptor = CtrThenHmacContentCryptor ( macKey: masterkey. macMasterKey, cryptoSupport: defaultCryptoSupport )
95
95
case . sivGcm:
96
- contentCryptor = GcmContentCryptor ( )
96
+ chosenContentCryptor = GcmContentCryptor ( )
97
97
}
98
- self . init ( masterkey: masterkey, cryptoSupport: cryptoSupport , contentCryptor: contentCryptor )
98
+ self . init ( masterkey: masterkey, cryptoSupport: defaultCryptoSupport , contentCryptor: chosenContentCryptor )
99
99
}
100
100
101
101
// MARK: - Path Encryption and Decryption
@@ -295,7 +295,6 @@ public class Cryptor {
295
295
let header = try decryptHeader ( ciphertextHeader)
296
296
297
297
// decrypt and write cleartext content:
298
- let ciphertextChunkSize = contentCryptor. nonceLen + cleartextChunkSize + contentCryptor. tagLen
299
298
var chunkNumber : UInt64 = 0
300
299
while ciphertextStream. hasBytesAvailable {
301
300
try autoreleasepool {
You can’t perform that action at this time.
0 commit comments