diff --git a/Sources/Crypto/ASN1/ASN1.swift b/Sources/Crypto/ASN1/ASN1.swift index b14b324e..755d01c2 100644 --- a/Sources/Crypto/ASN1/ASN1.swift +++ b/Sources/Crypto/ASN1/ASN1.swift @@ -637,7 +637,7 @@ extension ArraySlice where Element == UInt8 { let requiredBits = UInt.bitWidth - length.leadingZeroBitCount switch requiredBits { case 0...7: - // For 0 to 7 bits, the long form is unnacceptable and we require the short. + // For 0 to 7 bits, the long form is unacceptable and we require the short. throw CryptoKitASN1Error.unsupportedFieldLength case 8...: // For 8 or more bits, fieldLength should be the minimum required. diff --git a/Sources/Crypto/CryptoKitErrors.swift b/Sources/Crypto/CryptoKitErrors.swift index bd1bf3ed..e046aa90 100644 --- a/Sources/Crypto/CryptoKitErrors.swift +++ b/Sources/Crypto/CryptoKitErrors.swift @@ -18,7 +18,7 @@ /// - incorrectKeySize: A key is being deserialized with an incorrect key size. /// - incorrectParameterSize: The number of bytes passed for a given argument is incorrect. /// - authenticationFailure: The authentication tag or signature is incorrect. -/// - underlyingCoreCryptoError: An unexpected error at a lower-level occured. +/// - underlyingCoreCryptoError: An unexpected error at a lower-level occurred. /// - wrapFailure: Failed to wrap key /// - unwrapFailure: Failed to unwrap key public enum CryptoKitError: Error { diff --git a/Sources/Crypto/Key Agreement/ECDH.swift b/Sources/Crypto/Key Agreement/ECDH.swift index acb8e75c..acd1b76b 100644 --- a/Sources/Crypto/Key Agreement/ECDH.swift +++ b/Sources/Crypto/Key Agreement/ECDH.swift @@ -123,7 +123,7 @@ extension P256 { public init(derRepresentation: Bytes) throws where Bytes.Element == UInt8 { let bytes = Array(derRepresentation) - // We have to try to parse this twice because we have no informaton about what kind of key this is. + // We have to try to parse this twice because we have no information about what kind of key this is. // We try with PKCS#8 first, and then fall back to SEC.1. do { @@ -257,7 +257,7 @@ extension P256 { public init(derRepresentation: Bytes) throws where Bytes.Element == UInt8 { let bytes = Array(derRepresentation) - // We have to try to parse this twice because we have no informaton about what kind of key this is. + // We have to try to parse this twice because we have no information about what kind of key this is. // We try with PKCS#8 first, and then fall back to SEC.1. do { @@ -391,7 +391,7 @@ extension P384 { public init(derRepresentation: Bytes) throws where Bytes.Element == UInt8 { let bytes = Array(derRepresentation) - // We have to try to parse this twice because we have no informaton about what kind of key this is. + // We have to try to parse this twice because we have no information about what kind of key this is. // We try with PKCS#8 first, and then fall back to SEC.1. do { @@ -525,7 +525,7 @@ extension P384 { public init(derRepresentation: Bytes) throws where Bytes.Element == UInt8 { let bytes = Array(derRepresentation) - // We have to try to parse this twice because we have no informaton about what kind of key this is. + // We have to try to parse this twice because we have no information about what kind of key this is. // We try with PKCS#8 first, and then fall back to SEC.1. do { @@ -659,7 +659,7 @@ extension P521 { public init(derRepresentation: Bytes) throws where Bytes.Element == UInt8 { let bytes = Array(derRepresentation) - // We have to try to parse this twice because we have no informaton about what kind of key this is. + // We have to try to parse this twice because we have no information about what kind of key this is. // We try with PKCS#8 first, and then fall back to SEC.1. do { @@ -793,7 +793,7 @@ extension P521 { public init(derRepresentation: Bytes) throws where Bytes.Element == UInt8 { let bytes = Array(derRepresentation) - // We have to try to parse this twice because we have no informaton about what kind of key this is. + // We have to try to parse this twice because we have no information about what kind of key this is. // We try with PKCS#8 first, and then fall back to SEC.1. do { diff --git a/Sources/Crypto/Key Agreement/ECDH.swift.gyb b/Sources/Crypto/Key Agreement/ECDH.swift.gyb index 57b7094e..e2982567 100644 --- a/Sources/Crypto/Key Agreement/ECDH.swift.gyb +++ b/Sources/Crypto/Key Agreement/ECDH.swift.gyb @@ -129,7 +129,7 @@ extension ${CURVE} { public init(derRepresentation: Bytes) throws where Bytes.Element == UInt8 { let bytes = Array(derRepresentation) - // We have to try to parse this twice because we have no informaton about what kind of key this is. + // We have to try to parse this twice because we have no information about what kind of key this is. // We try with PKCS#8 first, and then fall back to SEC.1. do { diff --git a/Sources/_CryptoExtras/ChaCha20CTR/ChaCha20CTR.swift b/Sources/_CryptoExtras/ChaCha20CTR/ChaCha20CTR.swift index 7d87b956..b2ac60b9 100644 --- a/Sources/_CryptoExtras/ChaCha20CTR/ChaCha20CTR.swift +++ b/Sources/_CryptoExtras/ChaCha20CTR/ChaCha20CTR.swift @@ -36,7 +36,7 @@ extension Insecure { /// - nonce: A 12 byte nonce for ChaCha20 encryption. The nonce must be unique for every use of the key to seal data. /// - Returns: The encrypted ciphertext /// - Throws: CipherError errors - /// - Warning: You most likely want to use the ChaChaPoly implemention with AuthenticatedData available at `Crypto.ChaChaPoly` + /// - Warning: You most likely want to use the ChaChaPoly implementation with AuthenticatedData available at `Crypto.ChaChaPoly` public static func encrypt< Plaintext: DataProtocol >( diff --git a/Tests/CryptoTests/Utils/XCTestUtils.swift b/Tests/CryptoTests/Utils/XCTestUtils.swift index 02b51c89..90f6ddf0 100644 --- a/Tests/CryptoTests/Utils/XCTestUtils.swift +++ b/Tests/CryptoTests/Utils/XCTestUtils.swift @@ -42,7 +42,7 @@ extension XCTestCase { /// Unwraps the given optional value, or if it is nil, throws an error and /// registers an XCTest failure. Meant to be used in a test method that has /// been marked as `throws`. - /// - Note: this is a replacement for `XCTUnwrap`, which is not availble + /// - Note: this is a replacement for `XCTUnwrap`, which is not available /// in SPM command line builds as of this writing: func unwrap(_ optional: T?, file: StaticString = (#file), line: UInt = #line) throws -> T { guard let wrapped = optional else {