Browse Source

Merge branch 'krzyzanowskim:main' into main

Zsombor Szabo 2 years ago
parent
commit
8c8aff8daa

+ 3 - 0
CHANGELOG

@@ -1,3 +1,6 @@
+1.7.1
+- Address Swift 5.8 warnings
+
 1.7.0
 1.7.0
 - Fix compilation warnings
 - Fix compilation warnings
 - Ignore unknown character for base64 decoding
 - Ignore unknown character for base64 decoding

+ 3 - 0
CONTRIBUTORS.txt

@@ -3,6 +3,7 @@ organizations who have contributed source code to CryptoSwift.
 
 
 ### Contributors
 ### Contributors
 
 
+- 0xabhisek <128348758+0xabhisek@users.noreply.github.com>
 - Adolfo Martinelli <adolfo@airmap.com>
 - Adolfo Martinelli <adolfo@airmap.com>
 - Aidan Woods <aidantwoods@gmail.com>
 - Aidan Woods <aidantwoods@gmail.com>
 - Alejandro Isaza <alejandro.isaza@gmail.com>
 - Alejandro Isaza <alejandro.isaza@gmail.com>
@@ -71,10 +72,12 @@ organizations who have contributed source code to CryptoSwift.
 - Matias Cudich <mcudich@gmail.com>
 - Matias Cudich <mcudich@gmail.com>
 - Matias Piipari <matias.piipari@gmail.com>
 - Matias Piipari <matias.piipari@gmail.com>
 - Matthew Chung <matthewchung74@gmail.com>
 - Matthew Chung <matthewchung74@gmail.com>
+- Maxence Mottard <mottard.maxence@gmail.com>
 - Michael Ledin <m.ledin@appheads.ru>
 - Michael Ledin <m.ledin@appheads.ru>
 - Michael Redig <mredig@gmail.com>
 - Michael Redig <mredig@gmail.com>
 - Mikael LE GOFF <mikael@mercari.com>
 - Mikael LE GOFF <mikael@mercari.com>
 - Mo Ramezanpoor <me@mohsenr.com>
 - Mo Ramezanpoor <me@mohsenr.com>
+- Nabil Elqatib <nabilelqatib@gmail.com>
 - Nate West <nwest@detroitlabs.com>
 - Nate West <nwest@detroitlabs.com>
 - Nathan Fallet <contact@nathanfallet.me>
 - Nathan Fallet <contact@nathanfallet.me>
 - Nicholas Maccharoli <nicko@screaming-cactus.com>
 - Nicholas Maccharoli <nicko@screaming-cactus.com>

+ 1 - 1
CryptoSwift.podspec

@@ -1,6 +1,6 @@
 Pod::Spec.new do |s|
 Pod::Spec.new do |s|
   s.name         = "CryptoSwift"
   s.name         = "CryptoSwift"
-  s.version      = "1.6.0"
+  s.version      = "1.7.1"
   s.source       = { :git => "https://github.com/krzyzanowskim/CryptoSwift.git", :tag => "#{s.version}" }
   s.source       = { :git => "https://github.com/krzyzanowskim/CryptoSwift.git", :tag => "#{s.version}" }
   s.summary      = "Cryptography in Swift. SHA, MD5, CRC, PBKDF, Poly1305, HMAC, CMAC, HDKF, Scrypt, ChaCha20, Rabbit, Blowfish, AES, RSA."
   s.summary      = "Cryptography in Swift. SHA, MD5, CRC, PBKDF, Poly1305, HMAC, CMAC, HDKF, Scrypt, ChaCha20, Rabbit, Blowfish, AES, RSA."
   s.description  = "Cryptography functions and helpers for Swift implemented in Swift. SHA-1, SHA-2, SHA-3, MD5, PBKDF1, PBKDF2, Scrypt, CRC, Poly1305, HMAC, ChaCha20, Rabbit, Blowfish, AES, RSA"
   s.description  = "Cryptography functions and helpers for Swift implemented in Swift. SHA-1, SHA-2, SHA-3, MD5, PBKDF1, PBKDF2, Scrypt, CRC, Poly1305, HMAC, ChaCha20, Rabbit, Blowfish, AES, RSA"

+ 1 - 1
LICENSE

@@ -1,4 +1,4 @@
-Copyright (C) 2014-2017 Marcin Krzyżanowski <marcin.krzyzanowski@gmail.com>
+Copyright (C) 2014-3099 Marcin Krzyżanowski <marcin.krzyzanowski@gmail.com>
 This software is provided 'as-is', without any express or implied warranty.
 This software is provided 'as-is', without any express or implied warranty.
 
 
 In no event will the authors be held liable for any damages arising from the use of this software.
 In no event will the authors be held liable for any damages arising from the use of this software.

+ 2 - 2
README.md

@@ -127,7 +127,7 @@ It is recommended to enable [Whole-Module Optimization](https://swift.org/blog/w
 You can use [Swift Package Manager](https://swift.org/package-manager/) and specify dependency in `Package.swift` by adding this:
 You can use [Swift Package Manager](https://swift.org/package-manager/) and specify dependency in `Package.swift` by adding this:
 
 
 ```swift
 ```swift
-.package(url: "https://github.com/krzyzanowskim/CryptoSwift.git", .upToNextMajor(from: "1.7.0"))
+.package(url: "https://github.com/krzyzanowskim/CryptoSwift.git", .upToNextMajor(from: "1.7.1"))
 ```
 ```
 
 
 See: [Package.swift - manual](http://blog.krzyzanowskim.com/2016/08/09/package-swift-manual/)
 See: [Package.swift - manual](http://blog.krzyzanowskim.com/2016/08/09/package-swift-manual/)
@@ -139,7 +139,7 @@ Notice: Swift Package Manager uses debug configuration for debug Xcode build, th
 You can use [CocoaPods](https://cocoapods.org/pods/CryptoSwift).
 You can use [CocoaPods](https://cocoapods.org/pods/CryptoSwift).
 
 
 ```ruby
 ```ruby
-pod 'CryptoSwift', '~> 1.7.0'
+pod 'CryptoSwift', '~> 1.7.1'
 ```
 ```
 
 
 Bear in mind that CocoaPods will build CryptoSwift without [Whole-Module Optimization](https://swift.org/blog/whole-module-optimizations/) that may impact performance. You can change it manually after installation, or use [cocoapods-wholemodule](https://github.com/jedlewison/cocoapods-wholemodule) plugin.
 Bear in mind that CocoaPods will build CryptoSwift without [Whole-Module Optimization](https://swift.org/blog/whole-module-optimizations/) that may impact performance. You can change it manually after installation, or use [cocoapods-wholemodule](https://github.com/jedlewison/cocoapods-wholemodule) plugin.

+ 4 - 0
Sources/CryptoSwift/Scrypt.swift

@@ -121,7 +121,11 @@ private extension Scrypt {
 
 
     /* 1: X <-- B */
     /* 1: X <-- B */
     let typedBlock = block.assumingMemoryBound(to: UInt32.self)
     let typedBlock = block.assumingMemoryBound(to: UInt32.self)
+#if compiler(>=5.8)
+    X.update(from: typedBlock, count: 32 * self.r)
+#else
     X.assign(from: typedBlock, count: 32 * self.r)
     X.assign(from: typedBlock, count: 32 * self.r)
+#endif
 
 
     /* 2: for i = 0 to N - 1 do */
     /* 2: for i = 0 to N - 1 do */
     for i in stride(from: 0, to: self.N, by: 2) {
     for i in stride(from: 0, to: self.N, by: 2) {

+ 2 - 0
Sources/CryptoSwift/String+Extension.swift

@@ -13,6 +13,8 @@
 //  - This notice may not be removed or altered from any source or binary distribution.
 //  - This notice may not be removed or altered from any source or binary distribution.
 //
 //
 
 
+import Foundation
+
 /** String extension */
 /** String extension */
 extension String {
 extension String {
 
 

+ 1 - 1
config/Project-Shared.xcconfig

@@ -1,4 +1,4 @@
-MARKETING_VERSION = 1.7.0
+MARKETING_VERSION = 1.7.1
 
 
 SUPPORTED_PLATFORMS = iphonesimulator iphoneos macosx appletvos watchos appletvsimulator watchsimulator
 SUPPORTED_PLATFORMS = iphonesimulator iphoneos macosx appletvos watchos appletvsimulator watchsimulator