NathanFallet 1 month ago
parent
commit
e45a263842
4 changed files with 12 additions and 8 deletions
  1. 3 0
      CHANGELOG
  2. 1 1
      CryptoSwift.podspec
  3. 7 6
      README.md
  4. 1 1
      config/Project-Shared.xcconfig

+ 3 - 0
CHANGELOG

@@ -1,3 +1,6 @@
+1.9.0
+- Renamed bytes to byteArray in Data extension to avoid conflict with Swift 6.2 by @mluisbrown in #1076 and #1077
+
 1.8.5
 - Update README.md by @donatik27 in #1059
 - Add Android support by @marcprux in #1065

+ 1 - 1
CryptoSwift.podspec

@@ -1,6 +1,6 @@
 Pod::Spec.new do |s|
   s.name         = "CryptoSwift"
-  s.version      = "1.8.5"
+  s.version      = "1.9.0"
   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.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"

+ 7 - 6
README.md

@@ -131,7 +131,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:
 
 ```swift
-.package(url: "https://github.com/krzyzanowskim/CryptoSwift.git", from: "1.8.5")
+.package(url: "https://github.com/krzyzanowskim/CryptoSwift.git", from: "1.9.0")
 ```
 
 See: [Package.swift - manual](https://blog.krzyzanowskim.com/2016/08/09/package-swift-manual/)
@@ -143,7 +143,7 @@ Notice: Swift Package Manager uses debug configuration for debug Xcode build, th
 You can use [CocoaPods](https://cocoapods.org/pods/CryptoSwift).
 
 ```ruby
-pod 'CryptoSwift', '~> 1.8.5'
+pod 'CryptoSwift', '~> 1.9.0'
 ```
 
 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.
@@ -194,7 +194,8 @@ In the project, you'll find [single scheme](https://mxcl.dev/PromiseKit/news/201
 - Swift 4.2, branch [swift42](https://github.com/krzyzanowskim/CryptoSwift/tree/swift42) version <= 0.15.0
 - Swift 5.0, branch [swift5](https://github.com/krzyzanowskim/CryptoSwift/tree/swift5) version <= 1.2.0
 - Swift 5.1, branch [swift5](https://github.com/krzyzanowskim/CryptoSwift/tree/swift51) version <= 1.3.3
-- Swift 5.3 and newer, branch [main](https://github.com/krzyzanowskim/CryptoSwift/tree/main)
+- Swift 5.3, branch [swift53](https://github.com/krzyzanowskim/CryptoSwift/tree/swift53) version <= 1.8.5
+- Swift 6.2 and newer, branch [main](https://github.com/krzyzanowskim/CryptoSwift/tree/main)
 
 ## How-to
 
@@ -232,7 +233,7 @@ let data = Data([0x01, 0x02, 0x03])
 `Data` to `Array<UInt8>`
 
 ```swift
-let bytes = data.bytes                     // [1,2,3]
+let bytes = data.byteArray                // [1,2,3]
 ```
 
 [Hexadecimal](https://en.wikipedia.org/wiki/Hexadecimal) encoding:
@@ -405,11 +406,11 @@ let aes = try AES(key: key, blockMode: CBC(iv: iv), padding: .pkcs7)
 
 /* Encrypt Data */
 let inputData = Data()
-let encryptedBytes = try aes.encrypt(inputData.bytes)
+let encryptedBytes = try aes.encrypt(inputData.byteArray)
 let encryptedData = Data(encryptedBytes)
 
 /* Decrypt Data */
-let decryptedBytes = try aes.decrypt(encryptedData.bytes)
+let decryptedBytes = try aes.decrypt(encryptedData.byteArray)
 let decryptedData = Data(decryptedBytes)
 ```
 

+ 1 - 1
config/Project-Shared.xcconfig

@@ -1,4 +1,4 @@
-MARKETING_VERSION = 1.8.5
+MARKETING_VERSION = 1.9.0
 
 SUPPORTED_PLATFORMS = iphonesimulator iphoneos macosx appletvos watchos appletvsimulator watchsimulator xrsimulator xros