Kitura / BlueCryptor

Swift cross-platform crypto library using CommonCrypto/libcrypto
Apache License 2.0
191 stars 46 forks source link

Removed warnings found in Swift 4.1 #34

Closed KyeMaloy97 closed 6 years ago

KyeMaloy97 commented 6 years ago

There are a low level API changes in Swift 4.1 which were giving warnings in other projects that depended on this repo, such as Kitura Websocket.

This PR just adds some conditional checks to use the relevant API depending on the Swift version.

Ran the test suite locally and built locally too on Swift 3.1.1, 4.0.3 and 4.1. I have added Travis builds for these Swift versions too.

codecov-io commented 6 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@7e24e6b). Click here to learn what that means. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #34   +/-   ##
=========================================
  Coverage          ?   76.72%           
=========================================
  Files             ?       10           
  Lines             ?      954           
  Branches          ?        0           
=========================================
  Hits              ?      732           
  Misses            ?      222           
  Partials          ?        0
Flag Coverage Δ
#Cryptor 76.72% <100%> (?)
Impacted Files Coverage Δ
Sources/Cryptor/StreamCryptor.swift 81% <100%> (ø)
Sources/Cryptor/HMAC.swift 70.86% <100%> (ø)
Sources/Cryptor/Digest.swift 93.18% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7e24e6b...bb5fa2b. Read the comment docs.

ianpartridge commented 6 years ago

You checked in the Xcode project.... Please remove it and add Cryptor.xcodeproj to .gitignore.

billabt commented 6 years ago

This PR looks fine to me. Will merge it. An' yes, it has an Xcode project. This is because there are variations on the build for different platforms that have been requested by users.