Skip to content

Commit b5dde9c

Browse files
authored
Bring swift-crypto up to date with CryptoKit 2025 Beta 1 (#359)
This PR sets swift-crypto up for alignment with the WWDC 2025 CryptoKit APIs. This includes the parity APIs for MLKEM and MLDSA, as well as XWing. At this time the SHA3 APIs are disabled, as they require a novel implementation strategy. This will come later in the summer. All API features that require SHA3 are therefore also disabled at runtime.
1 parent 3ef6559 commit b5dde9c

File tree

120 files changed

+8480
-1654
lines changed

Some content is hidden

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

120 files changed

+8480
-1654
lines changed

.swiftformatignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Sources/Crypto/Digests/Digest.swift
2525
Sources/Crypto/Digests/Digests.swift
2626
Sources/Crypto/Digests/HashFunctions.swift
2727
Sources/Crypto/Digests/HashFunctions_SHA2.swift
28+
Sources/Crypto/Digests/HashFunctions_SHA3.swift
2829
Sources/Crypto/HPKE/Ciphersuite/HPKE-AEAD.swift
2930
Sources/Crypto/HPKE/Ciphersuite/HPKE-Ciphersuite.swift
3031
Sources/Crypto/HPKE/Ciphersuite/HPKE-KDF.swift
@@ -43,8 +44,12 @@ Sources/Crypto/HPKE/Modes/HPKE-Modes.swift
4344
Sources/Crypto/Insecure/Insecure.swift
4445
Sources/Crypto/Insecure/Insecure_HashFunctions.swift
4546
Sources/Crypto/KEM/KEM.swift
47+
Sources/Crypto/KEM/KEM-Errors.swift
48+
Sources/Crypto/KEM/MLKEM.swift
49+
Sources/Crypto/KEM/XWing.swift
4650
Sources/Crypto/Key Agreement/DH.swift
4751
Sources/Crypto/Key Agreement/ECDH.swift
52+
Sources/Crypto/Key Derivation/ANSIx963.swift
4853
Sources/Crypto/Key Derivation/HKDF.swift
4954
Sources/Crypto/Key Wrapping/AESWrap.swift
5055
Sources/Crypto/Keys/EC/Curve25519.swift
@@ -58,6 +63,7 @@ Sources/Crypto/Message Authentication Codes/MessageAuthenticationCode.swift
5863
Sources/Crypto/PRF/AES.swift
5964
Sources/Crypto/Signatures/ECDSA.swift
6065
Sources/Crypto/Signatures/Ed25519.swift
66+
Sources/Crypto/Signatures/MLDSA.swift
6167
Sources/Crypto/Signatures/Signature.swift
6268
Sources/Crypto/Util/PrettyBytes.swift
6369
Sources/Crypto/Util/SafeCompare.swift
@@ -116,6 +122,9 @@ Tests/CryptoTests/Encodings/DERTests.swift
116122
Tests/CryptoTests/Encodings/ECKeyEncodingsTests.swift
117123
Tests/CryptoTests/HPKE/HPKETests-TestVectors.swift
118124
Tests/CryptoTests/HPKE/HPKETests.swift
125+
Tests/CryptoTests/KEM/MLKEMKeyGenTests.swift
126+
Tests/CryptoTests/KEM/MLKEMTests.swift
127+
Tests/CryptoTests/KEM/XWingTests.swift
119128
Tests/CryptoTests/Key Derivation/ECprivateKeysFromSeeds.swift
120129
Tests/CryptoTests/Key Derivation/HKDFTests.swift
121130
Tests/CryptoTests/Key Derivation/SharedSecretTests.swift
@@ -126,6 +135,8 @@ Tests/CryptoTests/SecureBytes/SecureBytesTests.swift
126135
Tests/CryptoTests/Signatures/ECDSA/ECDSASignatureTests.swift
127136
Tests/CryptoTests/Signatures/ECDSA/RawECDSASignaturesTests.swift
128137
Tests/CryptoTests/Signatures/EdDSA/Ed25519-Runner.swift
138+
Tests/CryptoTests/Signatures/MLDSA/MLDSAKeyGenTests.swift
139+
Tests/CryptoTests/Signatures/MLDSA/MLDSATests.swift
129140
Tests/CryptoTests/Utils/PrettyBytes.swift
130141
Tests/CryptoTests/Utils/RFCVector.swift
131142
Tests/CryptoTests/Utils/SplitData.swift

Package.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,14 @@ let package = Package(
177177
name: "CryptoTests",
178178
dependencies: ["Crypto"],
179179
resources: [
180-
.copy("HPKE/hpke-test-vectors.json")
180+
.copy("HPKE/hpke-test-vectors.json"),
181+
.copy("KEM/MLKEM768_BSSLKAT.json"),
182+
.copy("KEM/MLKEM768KAT.json"),
183+
.copy("KEM/MLKEM1024_BSSLKAT.json"),
184+
.copy("KEM/MLKEM1024KAT.json"),
185+
.copy("KEM/test-vectors.json"),
186+
.copy("Signatures/MLDSA/MLDSA65_KeyGen_KAT.json"),
187+
.copy("Signatures/MLDSA/MLDSA87_KeyGen_KAT.json"),
181188
],
182189
swiftSettings: swiftSettings
183190
),

Sources/CCryptoBoringSSL/include/CCryptoBoringSSL.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include "CCryptoBoringSSL_cmac.h"
3232
#include "CCryptoBoringSSL_conf.h"
3333
#include "CCryptoBoringSSL_cpu.h"
34+
#include "CCryptoBoringSSL_ctrdrbg.h"
3435
#include "CCryptoBoringSSL_curve25519.h"
3536
#include "CCryptoBoringSSL_des.h"
3637
#include "CCryptoBoringSSL_e_os2.h"
@@ -62,5 +63,6 @@
6263
#include "CCryptoBoringSSL_siphash.h"
6364
#include "CCryptoBoringSSL_trust_token.h"
6465
#include "CCryptoBoringSSL_x509v3.h"
66+
#include "CCryptoBoringSSL_xwing.h"
6567

6668
#endif // C_CRYPTO_BORINGSSL_H

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

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,26 @@
1414
#if CRYPTO_IN_SWIFTPM && !CRYPTO_IN_SWIFTPM_FORCE_BUILD_API
1515
@_exported import CryptoKit
1616
#else
17-
#if !CRYPTO_IN_SWIFTPM_FORCE_BUILD_API
17+
#if (!CRYPTO_IN_SWIFTPM_FORCE_BUILD_API) || CRYPTOKIT_NO_ACCESS_TO_FOUNDATION
1818
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, macCatalyst 13, visionOS 1.0, *)
1919
typealias AESGCMImpl = CoreCryptoGCMImpl
20-
import Security
2120
#else
2221
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, macCatalyst 13, visionOS 1.0, *)
2322
typealias AESGCMImpl = OpenSSLAESGCMImpl
2423
#endif
2524

26-
import Foundation
25+
#if CRYPTOKIT_NO_ACCESS_TO_FOUNDATION
26+
public import SwiftSystem
27+
#else
28+
public import Foundation
29+
#endif
2730

2831
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, macCatalyst 13, visionOS 1.0, *)
2932
extension AES {
3033
/// The Advanced Encryption Standard (AES) Galois Counter Mode (GCM) cipher
3134
/// suite.
3235
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, macCatalyst 13, visionOS 1.0, *)
33-
public enum GCM: Cipher {
36+
public enum GCM: Cipher, Sendable {
3437
static let tagByteCount = 16
3538
static let defaultNonceByteCount = 12
3639

@@ -41,12 +44,12 @@ extension AES {
4144
/// - Parameters:
4245
/// - message: The plaintext data to seal.
4346
/// - key: A cryptographic key used to seal the message.
44-
/// - nonce: The nonce the sealing process requires. If you don't provide a nonce, the method generates a random one by invoking ``AES.GCM.Nonce()``.
47+
/// - nonce: The nonce the sealing process requires. If you don't provide a nonce, the method generates a random one by invoking ``AES/GCM/Nonce/init()``.
4548
/// - authenticatedData: Additional data to be authenticated.
4649
///
4750
/// - Returns: The sealed message.
4851
public static func seal<Plaintext: DataProtocol, AuthenticatedData: DataProtocol>
49-
(_ message: Plaintext, using key: SymmetricKey, nonce: Nonce? = nil, authenticating authenticatedData: AuthenticatedData) throws -> SealedBox {
52+
(_ message: Plaintext, using key: SymmetricKey, nonce: Nonce? = nil, authenticating authenticatedData: AuthenticatedData) throws(CryptoKitMetaError) -> SealedBox {
5053
return try AESGCMImpl.seal(key: key, message: message, nonce: nonce, authenticatedData: authenticatedData)
5154
}
5255

@@ -56,11 +59,11 @@ extension AES {
5659
/// - Parameters:
5760
/// - message: The plaintext data to seal.
5861
/// - key: A cryptographic key used to seal the message.
59-
/// - nonce: The nonce the sealing process requires. If you don't provide a nonce, the method generates a random one by invoking ``AES.GCM.Nonce()``.
62+
/// - nonce: The nonce the sealing process requires. If you don't provide a nonce, the method generates a random one by invoking ``AES/GCM/Nonce/init()``.
6063
///
6164
/// - Returns: The sealed message.
6265
public static func seal<Plaintext: DataProtocol>
63-
(_ message: Plaintext, using key: SymmetricKey, nonce: Nonce? = nil) throws -> SealedBox {
66+
(_ message: Plaintext, using key: SymmetricKey, nonce: Nonce? = nil) throws(CryptoKitMetaError) -> SealedBox {
6467
return try AESGCMImpl.seal(key: key, message: message, nonce: nonce, authenticatedData: Data?.none)
6568
}
6669

@@ -76,7 +79,7 @@ extension AES {
7679
/// box, as long as the correct key is used and authentication succeeds.
7780
/// The call throws an error if decryption or authentication fail.
7881
public static func open<AuthenticatedData: DataProtocol>
79-
(_ sealedBox: SealedBox, using key: SymmetricKey, authenticating authenticatedData: AuthenticatedData) throws -> Data {
82+
(_ sealedBox: SealedBox, using key: SymmetricKey, authenticating authenticatedData: AuthenticatedData) throws(CryptoKitMetaError) -> Data {
8083
return try AESGCMImpl.open(key: key, sealedBox: sealedBox, authenticatedData: authenticatedData)
8184
}
8285

@@ -89,7 +92,7 @@ extension AES {
8992
/// - Returns: The original plaintext message that was sealed in the
9093
/// box, as long as the correct key is used and authentication succeeds.
9194
/// The call throws an error if decryption or authentication fail.
92-
public static func open(_ sealedBox: SealedBox, using key: SymmetricKey) throws -> Data {
95+
public static func open(_ sealedBox: SealedBox, using key: SymmetricKey) throws(CryptoKitMetaError) -> Data {
9396
return try AESGCMImpl.open(key: key, sealedBox: sealedBox, authenticatedData: Data?.none)
9497
}
9598
}
@@ -112,7 +115,7 @@ extension AES.GCM {
112115
/// The receiver uses another instance of the same cipher, like the
113116
/// ``open(_:using:)`` method, to open the box.
114117
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, macCatalyst 13, visionOS 1.0, *)
115-
public struct SealedBox: AEADSealedBox {
118+
public struct SealedBox: AEADSealedBox, Sendable {
116119
private let combinedRepresentation: Data
117120
private let nonceByteCount: Int
118121

@@ -167,13 +170,17 @@ extension AES.GCM {
167170
/// - combined: The combined bytes of the nonce, encrypted data, and
168171
/// authentication tag.
169172
@inlinable
170-
public init<D: DataProtocol>(combined: D) throws {
173+
public init<D: DataProtocol>(combined: D) throws(CryptoKitMetaError) {
171174
// AES minimum nonce (12 bytes) + AES tag (16 bytes)
172175
// While we have these values in the internal APIs, we can't use it in inlinable code.
173176
let aesGCMOverhead = 12 + 16
174177

175178
if combined.count < aesGCMOverhead {
179+
#if hasFeature(Embedded)
180+
throw CryptoKitMetaError.cryptoKitError(underlyingError: CryptoKitError.incorrectParameterSize)
181+
#else
176182
throw CryptoKitError.incorrectParameterSize
183+
#endif
177184
}
178185

179186
self.init(combined: Data(combined))
@@ -185,9 +192,9 @@ extension AES.GCM {
185192
/// - nonce: The nonce.
186193
/// - ciphertext: The encrypted data.
187194
/// - tag: The authentication tag.
188-
public init<C: DataProtocol, T: DataProtocol>(nonce: AES.GCM.Nonce, ciphertext: C, tag: T) throws {
195+
public init<C: DataProtocol, T: DataProtocol>(nonce: AES.GCM.Nonce, ciphertext: C, tag: T) throws(CryptoKitMetaError) {
189196
guard tag.count == AES.GCM.tagByteCount else {
190-
throw CryptoKitError.incorrectParameterSize
197+
throw error(CryptoKitError.incorrectParameterSize)
191198
}
192199

193200
let nonceByteCount = nonce.bytes.count

Sources/Crypto/AEADs/ChachaPoly/ChaChaPoly.swift

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,24 @@
1414
#if CRYPTO_IN_SWIFTPM && !CRYPTO_IN_SWIFTPM_FORCE_BUILD_API
1515
@_exported import CryptoKit
1616
#else
17-
#if !CRYPTO_IN_SWIFTPM_FORCE_BUILD_API
17+
#if (!CRYPTO_IN_SWIFTPM_FORCE_BUILD_API) || CRYPTOKIT_NO_ACCESS_TO_FOUNDATION
1818
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, macCatalyst 13, visionOS 1.0, *)
1919
typealias ChaChaPolyImpl = CoreCryptoChaChaPolyImpl
20-
import Security
2120
#else
2221
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, macCatalyst 13, visionOS 1.0, *)
2322
typealias ChaChaPolyImpl = OpenSSLChaChaPolyImpl
2423
#endif
2524

26-
import Foundation
25+
#if CRYPTOKIT_NO_ACCESS_TO_FOUNDATION
26+
public import SwiftSystem
27+
#else
28+
public import Foundation
29+
#endif
30+
2731

2832
/// An implementation of the ChaCha20-Poly1305 cipher.
2933
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, macCatalyst 13, visionOS 1.0, *)
30-
public enum ChaChaPoly: Cipher {
34+
public enum ChaChaPoly: Cipher, Sendable {
3135
static let tagByteCount = 16
3236
static let keyBitsCount = 256
3337
static let nonceByteCount = 12
@@ -39,7 +43,7 @@ public enum ChaChaPoly: Cipher {
3943
/// - Parameters:
4044
/// - message: The plaintext data to seal.
4145
/// - key: A cryptographic key used to seal the message.
42-
/// - nonce: The nonce the sealing process requires. If you don't provide a nonce, the method generates a random one by invoking ``ChaChaPoly.Nonce()``.
46+
/// - nonce: The nonce the sealing process requires. If you don't provide a nonce, the method generates a random one by invoking ``ChaChaPoly/Nonce/init()``.
4347
/// - authenticatedData: Additional data to be authenticated.
4448
///
4549
/// - Returns: The sealed message.
@@ -54,7 +58,7 @@ public enum ChaChaPoly: Cipher {
5458
/// - Parameters:
5559
/// - message: The plaintext data to seal.
5660
/// - key: A cryptographic key used to seal the message.
57-
/// - nonce: The nonce the sealing process requires. If you don't provide a nonce, the method generates a random one by invoking ``ChaChaPoly.Nonce()``.
61+
/// - nonce: The nonce the sealing process requires. If you don't provide a nonce, the method generates a random one by invoking ``ChaChaPoly/Nonce/init()``.
5862
///
5963
/// - Returns: The sealed message.
6064
public static func seal<Plaintext: DataProtocol>
@@ -111,7 +115,7 @@ extension ChaChaPoly {
111115
/// ``open(_:using:)`` method, to open the box.
112116
@frozen
113117
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, macCatalyst 13, visionOS 1.0, *)
114-
public struct SealedBox: AEADSealedBox {
118+
public struct SealedBox: AEADSealedBox, Sendable {
115119
/// A combined element composed of the tag, the nonce, and the
116120
/// ciphertext.
117121
///

Sources/Crypto/AEADs/Cipher.swift

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,16 @@
1414
#if CRYPTO_IN_SWIFTPM && !CRYPTO_IN_SWIFTPM_FORCE_BUILD_API
1515
@_exported import CryptoKit
1616
#else
17+
18+
#if CRYPTOKIT_NO_ACCESS_TO_FOUNDATION
19+
import SwiftSystem
20+
#else
1721
import Foundation
22+
#endif
23+
1824

1925
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, macCatalyst 13, visionOS 1.0, *)
20-
protocol AEADSealedBox {
26+
protocol AEADSealedBox: Sendable {
2127
associatedtype Nonce: Sequence
2228
/// The authentication tag
2329
var tag: Data { get }
@@ -52,7 +58,7 @@ protocol Cipher {
5258
/// - Returns: The sealed box containing the ciphertext and authentication tag
5359
/// - Throws: An error occurred while encrypting or authenticating.
5460
static func seal<Plaintext: DataProtocol, AuthenticatedData: DataProtocol>
55-
(_ message: Plaintext, using key: SymmetricKey, nonce: Nonce?, authenticating: AuthenticatedData) throws -> SealedBox
61+
(_ message: Plaintext, using key: SymmetricKey, nonce: Nonce?, authenticating: AuthenticatedData) throws(CryptoKitMetaError) -> SealedBox
5662

5763
/// Opens the sealed box. This decrypts and verifies the authenticity of the message,
5864
/// and optionally verifies the authenticity of the authenticated data.
@@ -65,6 +71,6 @@ protocol Cipher {
6571
/// - Returns: Returns the data, if the correct key is used and the authenticated data matches the one from the seal operation.
6672
/// - Throws: An error occurred while decrypting or authenticating.
6773
static func open<AuthenticatedData: DataProtocol>
68-
(_ sealedBox: SealedBox, using key: Key, authenticating: AuthenticatedData) throws -> Data
74+
(_ sealedBox: SealedBox, using key: Key, authenticating: AuthenticatedData) throws(CryptoKitMetaError) -> Data
6975
}
7076
#endif

Sources/Crypto/AEADs/Nonces.swift

Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,18 @@
1414
#if CRYPTO_IN_SWIFTPM && !CRYPTO_IN_SWIFTPM_FORCE_BUILD_API
1515
@_exported import CryptoKit
1616
#else
17-
import Foundation
17+
#if CRYPTOKIT_NO_ACCESS_TO_FOUNDATION
18+
public import SwiftSystem
19+
#else
20+
public import Foundation
21+
#endif
1822
// MARK: - Generated file, do NOT edit
1923
// any edits of this file WILL be overwritten and thus discarded
2024
// see section `gyb` in `README` for details.
2125

26+
27+
28+
2229
// MARK: - AES.GCM + Nonce
2330
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, macCatalyst 13, visionOS 1.0, *)
2431
extension AES.GCM {
@@ -28,7 +35,7 @@ extension AES.GCM {
2835
/// that nonces are unique per call to encryption APIs in order to protect the
2936
/// integrity of the encryption.
3037
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, macCatalyst 13, visionOS 1.0, *)
31-
public struct Nonce: ContiguousBytes, Sequence {
38+
public struct Nonce: ContiguousBytes, Sequence, Sendable {
3239
let bytes: Data
3340

3441
/// Creates a new random nonce.
@@ -49,11 +56,11 @@ extension AES.GCM {
4956
/// ``init()`` method to instead create a random nonce.
5057
///
5158
/// - Parameters:
52-
/// - data: A 12-byte data representation of the nonce. The initializer throws an
53-
/// error if the data has a length other than 12 bytes.
54-
public init<D: DataProtocol>(data: D) throws {
59+
/// - data: A data representation of the nonce.
60+
/// The initializer throws an error if the data has a length smaller than 12 bytes.
61+
public init<D: DataProtocol>(data: D) throws(CryptoKitMetaError) {
5562
if data.count < AES.GCM.defaultNonceByteCount {
56-
throw CryptoKitError.incorrectParameterSize
63+
throw error(CryptoKitError.incorrectParameterSize)
5764
}
5865

5966
self.bytes = Data(data)
@@ -70,10 +77,16 @@ extension AES.GCM {
7077
/// the duration of the closure’s execution.
7178
///
7279
/// - Returns: The return value, if any, of the body closure parameter.
80+
#if !hasFeature(Embedded)
7381
public func withUnsafeBytes<R>(_ body: (UnsafeRawBufferPointer) throws -> R) rethrows -> R {
7482
return try self.bytes.withUnsafeBytes(body)
7583
}
76-
84+
#else
85+
public func withUnsafeBytes<R, E: Error>(_ body: (UnsafeRawBufferPointer) throws(E) -> R) throws(E) -> R {
86+
return try self.bytes.withUnsafeBytes(body)
87+
}
88+
#endif
89+
7790
/// Returns an iterator over the elements of the nonce.
7891
public func makeIterator() -> Array<UInt8>.Iterator {
7992
self.withUnsafeBytes({ (buffPtr) in
@@ -92,7 +105,7 @@ extension ChaChaPoly {
92105
/// that nonces are unique per call to encryption APIs in order to protect the
93106
/// integrity of the encryption.
94107
@available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, macCatalyst 13, visionOS 1.0, *)
95-
public struct Nonce: ContiguousBytes, Sequence {
108+
public struct Nonce: ContiguousBytes, Sequence, Sendable {
96109
let bytes: Data
97110

98111
/// Creates a new random nonce.
@@ -113,11 +126,11 @@ extension ChaChaPoly {
113126
/// ``init()`` method to instead create a random nonce.
114127
///
115128
/// - Parameters:
116-
/// - data: A 12-byte data representation of the nonce. The initializer throws an
117-
/// error if the data has a length other than 12 bytes.
118-
public init<D: DataProtocol>(data: D) throws {
129+
/// - data: A 12-byte data representation of the nonce.
130+
/// The initializer throws an error if the data isn't 12 bytes long.
131+
public init<D: DataProtocol>(data: D) throws(CryptoKitMetaError) {
119132
if data.count != ChaChaPoly.nonceByteCount {
120-
throw CryptoKitError.incorrectParameterSize
133+
throw error(CryptoKitError.incorrectParameterSize)
121134
}
122135

123136
self.bytes = Data(data)
@@ -134,10 +147,16 @@ extension ChaChaPoly {
134147
/// the duration of the closure’s execution.
135148
///
136149
/// - Returns: The return value, if any, of the body closure parameter.
150+
#if !hasFeature(Embedded)
137151
public func withUnsafeBytes<R>(_ body: (UnsafeRawBufferPointer) throws -> R) rethrows -> R {
138152
return try self.bytes.withUnsafeBytes(body)
139153
}
140-
154+
#else
155+
public func withUnsafeBytes<R, E: Error>(_ body: (UnsafeRawBufferPointer) throws(E) -> R) throws(E) -> R {
156+
return try self.bytes.withUnsafeBytes(body)
157+
}
158+
#endif
159+
141160
/// Returns an iterator over the elements of the nonce.
142161
public func makeIterator() -> Array<UInt8>.Iterator {
143162
self.withUnsafeBytes({ (buffPtr) in

0 commit comments

Comments
 (0)