Skip to content

Commit e8d6eba

Browse files
authored
Add macCatalyst and visionOS to available platforms (#348)
1 parent e228596 commit e8d6eba

File tree

146 files changed

+673
-673
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+673
-673
lines changed

Sources/Crypto/AEADs/AES/GCM/AES-GCM.swift

+6-6
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@
1515
@_exported import CryptoKit
1616
#else
1717
#if !CRYPTO_IN_SWIFTPM_FORCE_BUILD_API
18-
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
18+
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, macCatalyst 13, visionOS 1.0, *)
1919
typealias AESGCMImpl = CoreCryptoGCMImpl
2020
import Security
2121
#else
22-
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
22+
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, macCatalyst 13, visionOS 1.0, *)
2323
typealias AESGCMImpl = OpenSSLAESGCMImpl
2424
#endif
2525

2626
import Foundation
2727

28-
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
28+
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, macCatalyst 13, visionOS 1.0, *)
2929
extension AES {
3030
/// The Advanced Encryption Standard (AES) Galois Counter Mode (GCM) cipher
3131
/// suite.
32-
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
32+
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, macCatalyst 13, visionOS 1.0, *)
3333
public enum GCM: Cipher {
3434
static let tagByteCount = 16
3535
static let defaultNonceByteCount = 12
@@ -95,7 +95,7 @@ extension AES {
9595
}
9696
}
9797

98-
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
98+
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, macCatalyst 13, visionOS 1.0, *)
9999
extension AES.GCM {
100100
/// A secure container for your data that you can access using a cipher.
101101
///
@@ -111,7 +111,7 @@ extension AES.GCM {
111111
///
112112
/// The receiver uses another instance of the same cipher, like the
113113
/// ``open(_:using:)`` method, to open the box.
114-
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
114+
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, macCatalyst 13, visionOS 1.0, *)
115115
public struct SealedBox: AEADSealedBox {
116116
private let combinedRepresentation: Data
117117
private let nonceByteCount: Int

Sources/Crypto/AEADs/AES/GCM/BoringSSL/AES-GCM_boring.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import CryptoBoringWrapper
1919
import Foundation
2020

21-
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
21+
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, macCatalyst 13, visionOS 1.0, *)
2222
enum OpenSSLAESGCMImpl {
2323
@inlinable
2424
static func seal<Plaintext: DataProtocol, AuthenticatedData: DataProtocol>(

Sources/Crypto/AEADs/ChachaPoly/BoringSSL/ChaChaPoly_boring.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import CryptoBoringWrapper
2020
import Foundation
2121

22-
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
22+
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, macCatalyst 13, visionOS 1.0, *)
2323
extension BoringSSLAEAD {
2424
/// Seal a given message.
2525
func seal<Plaintext: DataProtocol, Nonce: ContiguousBytes, AuthenticatedData: DataProtocol>(
@@ -62,7 +62,7 @@ extension BoringSSLAEAD {
6262
}
6363
}
6464

65-
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
65+
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, macCatalyst 13, visionOS 1.0, *)
6666
enum OpenSSLChaChaPolyImpl {
6767
static func encrypt<M: DataProtocol, AD: DataProtocol>(
6868
key: SymmetricKey,

Sources/Crypto/AEADs/ChachaPoly/ChaChaPoly.swift

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@
1515
@_exported import CryptoKit
1616
#else
1717
#if !CRYPTO_IN_SWIFTPM_FORCE_BUILD_API
18-
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
18+
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, macCatalyst 13, visionOS 1.0, *)
1919
typealias ChaChaPolyImpl = CoreCryptoChaChaPolyImpl
2020
import Security
2121
#else
22-
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
22+
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, macCatalyst 13, visionOS 1.0, *)
2323
typealias ChaChaPolyImpl = OpenSSLChaChaPolyImpl
2424
#endif
2525

2626
import Foundation
2727

2828
/// An implementation of the ChaCha20-Poly1305 cipher.
29-
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
29+
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, macCatalyst 13, visionOS 1.0, *)
3030
public enum ChaChaPoly: Cipher {
3131
static let tagByteCount = 16
3232
static let keyBitsCount = 256
@@ -93,7 +93,7 @@ public enum ChaChaPoly: Cipher {
9393
}
9494
}
9595

96-
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
96+
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, macCatalyst 13, visionOS 1.0, *)
9797
extension ChaChaPoly {
9898
/// A secure container for your data that you access using a cipher.
9999
///
@@ -110,7 +110,7 @@ extension ChaChaPoly {
110110
/// The receiver uses another instance of the same cipher, like the
111111
/// ``open(_:using:)`` method, to open the box.
112112
@frozen
113-
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
113+
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, macCatalyst 13, visionOS 1.0, *)
114114
public struct SealedBox: AEADSealedBox {
115115
/// A combined element composed of the tag, the nonce, and the
116116
/// ciphertext.

Sources/Crypto/AEADs/Cipher.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#else
1717
import Foundation
1818

19-
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
19+
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, macCatalyst 13, visionOS 1.0, *)
2020
protocol AEADSealedBox {
2121
associatedtype Nonce: Sequence
2222
/// The authentication tag
@@ -36,7 +36,7 @@ protocol AEADSealedBox {
3636
}
3737

3838
/// A type representing authenticated encryption with associated data.
39-
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
39+
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, macCatalyst 13, visionOS 1.0, *)
4040
protocol Cipher {
4141
associatedtype Key
4242
associatedtype SealedBox: AEADSealedBox

Sources/Crypto/AEADs/Nonces.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ import Foundation
2020
// see section `gyb` in `README` for details.
2121

2222
// MARK: - AES.GCM + Nonce
23-
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
23+
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, macCatalyst 13, visionOS 1.0, *)
2424
extension AES.GCM {
2525
/// A value used once during a cryptographic operation and then discarded.
2626
///
2727
/// Don’t reuse the same nonce for multiple calls to encryption APIs. It’s critical
2828
/// that nonces are unique per call to encryption APIs in order to protect the
2929
/// integrity of the encryption.
30-
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
30+
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, macCatalyst 13, visionOS 1.0, *)
3131
public struct Nonce: ContiguousBytes, Sequence {
3232
let bytes: Data
3333

@@ -84,14 +84,14 @@ extension AES.GCM {
8484
}
8585

8686
// MARK: - ChaChaPoly + Nonce
87-
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
87+
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, macCatalyst 13, visionOS 1.0, *)
8888
extension ChaChaPoly {
8989
/// A value used once during a cryptographic operation and then discarded.
9090
///
9191
/// Don’t reuse the same nonce for multiple calls to encryption APIs. It’s critical
9292
/// that nonces are unique per call to encryption APIs in order to protect the
9393
/// integrity of the encryption.
94-
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *)
94+
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, macCatalyst 13, visionOS 1.0, *)
9595
public struct Nonce: ContiguousBytes, Sequence {
9696
let bytes: Data
9797

0 commit comments

Comments
 (0)