From bed316ccce6c6c5bd77b7e7633c6c271b727a40e Mon Sep 17 00:00:00 2001 From: Siarhei Ladzeika Date: Sat, 4 Apr 2020 10:54:41 +0300 Subject: [PATCH] Fix PKCS7.add: removed unreachable code --- Sources/AES256CBC.swift | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/Sources/AES256CBC.swift b/Sources/AES256CBC.swift index aea695b..b9c5373 100644 --- a/Sources/AES256CBC.swift +++ b/Sources/AES256CBC.swift @@ -600,16 +600,9 @@ private struct PKCS7 { func add(bytes: [UInt8], blockSize: Int) -> [UInt8] { let padding = UInt8(blockSize - (bytes.count % blockSize)) var withPadding = bytes - if padding == 0 { - // If the original data is a multiple of N bytes, then an extra block of bytes with value N is added. - for _ in 0..