Marcin Krzyzanowski 7 лет назад
Родитель
Сommit
f540bee631
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      Sources/CryptoSwift/BlockMode/CCM.swift

+ 1 - 1
Sources/CryptoSwift/BlockMode/CCM.swift

@@ -115,7 +115,7 @@ class CCMModeWorker: StreamModeWorker, SeekableModeWorker, CounterModeWorker, Fi
         let hasAssociatedData = additionalAuthenticatedData != nil && !additionalAuthenticatedData!.isEmpty
         processControlInformation(nonce: self.nonce, tagLength: tagLength, hasAssociatedData: hasAssociatedData)
 
-        if let aad = additionalAuthenticatedData {
+        if let aad = additionalAuthenticatedData, hasAssociatedData {
             process(aad: aad)
         }
     }