From 302276fecd4c121cca14fa87c9b906d732efcf23 Mon Sep 17 00:00:00 2001 From: David Jones Date: Fri, 27 Sep 2019 15:05:41 +0100 Subject: [PATCH 1/3] ci: Update to Swift 5.1 --- .swift-version | 2 +- .travis.yml | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.swift-version b/.swift-version index a1ef0ca..a75b92f 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -5.0.2 +5.1 diff --git a/.travis.yml b/.travis.yml index 3d15993..fbc25d1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,12 +30,17 @@ matrix: dist: xenial sudo: required services: docker - env: DOCKER_IMAGE=swift:5.0.2-xenial + env: DOCKER_IMAGE=swift:5.0.3-xenial SWIFT_SNAPSHOT=5.0.3 - os: linux dist: xenial sudo: required services: docker - env: DOCKER_IMAGE=swift:5.0.2 SWIFT_SNAPSHOT=$SWIFT_DEVELOPMENT_SNAPSHOT + env: DOCKER_IMAGE=swift:5.1 + - os: linux + dist: xenial + sudo: required + services: docker + env: DOCKER_IMAGE=swift:5.1 SWIFT_SNAPSHOT=$SWIFT_DEVELOPMENT_SNAPSHOT - os: osx osx_image: xcode9.2 sudo: required @@ -52,6 +57,9 @@ matrix: osx_image: xcode10.2 sudo: required env: SWIFT_SNAPSHOT=5.0.1 JAZZY_ELIGIBLE=true + - os: osx + osx_image: xcode11 + sudo: required - os: osx osx_image: xcode11 sudo: required From 667ae53b7900530bfaea0cf20aff329aa2ac09a4 Mon Sep 17 00:00:00 2001 From: David Jones Date: Fri, 27 Sep 2019 16:46:34 +0100 Subject: [PATCH 2/3] Remove redundant OS guards around identical cases (to appease linter) --- Sources/Cryptor/StreamCryptor.swift | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/Sources/Cryptor/StreamCryptor.swift b/Sources/Cryptor/StreamCryptor.swift index f91004c..a54f808 100755 --- a/Sources/Cryptor/StreamCryptor.swift +++ b/Sources/Cryptor/StreamCryptor.swift @@ -211,8 +211,6 @@ public class StreamCryptor { /// public enum Algorithm { - #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) - /// Advanced Encryption Standard /// - Note: aes and aes128 are equivalent. case aes, aes128, aes192, aes256 @@ -232,29 +230,6 @@ public class StreamCryptor { /// blowfish case blowfish - #elseif os(Linux) - - /// Advanced Encryption Standard - /// - Note: aes and aes128 are equivalent. - case aes, aes128, aes192, aes256 - - /// Data Encryption Standard - case des - - /// Triple des - case tripleDes - - /// cast - case cast - - /// rc2 - case rc2 - - /// blowfish - case blowfish - - #endif - /// Blocksize, in bytes, of algorithm. public var blockSize: Int { From 83769d32bcd81c0a848ee2cfb59f6fe81b1433b5 Mon Sep 17 00:00:00 2001 From: David Jones Date: Mon, 30 Sep 2019 13:58:10 +0100 Subject: [PATCH 3/3] Remove compile warning with future versions of Swift --- Sources/Cryptor/Status.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Cryptor/Status.swift b/Sources/Cryptor/Status.swift index f6434db..be87926 100755 --- a/Sources/Cryptor/Status.swift +++ b/Sources/Cryptor/Status.swift @@ -280,7 +280,7 @@ public enum CryptorError: Swift.Error, CustomStringConvertible { case .invalidIVSizeOrLength: return "Invalid IV size or length." - case .fail(let (_, reason)): + case .fail(_, let reason): return reason } }