Skip to content

Commit dcf0815

Browse files
authored
Documentation - Typos (#179)
1 parent 33a20e6 commit dcf0815

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

Sources/Crypto/ASN1/ASN1.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ extension ArraySlice where Element == UInt8 {
637637
let requiredBits = UInt.bitWidth - length.leadingZeroBitCount
638638
switch requiredBits {
639639
case 0...7:
640-
// For 0 to 7 bits, the long form is unnacceptable and we require the short.
640+
// For 0 to 7 bits, the long form is unacceptable and we require the short.
641641
throw CryptoKitASN1Error.unsupportedFieldLength
642642
case 8...:
643643
// For 8 or more bits, fieldLength should be the minimum required.

Sources/Crypto/CryptoKitErrors.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
/// - incorrectKeySize: A key is being deserialized with an incorrect key size.
1919
/// - incorrectParameterSize: The number of bytes passed for a given argument is incorrect.
2020
/// - authenticationFailure: The authentication tag or signature is incorrect.
21-
/// - underlyingCoreCryptoError: An unexpected error at a lower-level occured.
21+
/// - underlyingCoreCryptoError: An unexpected error at a lower-level occurred.
2222
/// - wrapFailure: Failed to wrap key
2323
/// - unwrapFailure: Failed to unwrap key
2424
public enum CryptoKitError: Error {

Sources/Crypto/Key Agreement/ECDH.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ extension P256 {
123123
public init<Bytes: RandomAccessCollection>(derRepresentation: Bytes) throws where Bytes.Element == UInt8 {
124124
let bytes = Array(derRepresentation)
125125

126-
// We have to try to parse this twice because we have no informaton about what kind of key this is.
126+
// We have to try to parse this twice because we have no information about what kind of key this is.
127127
// We try with PKCS#8 first, and then fall back to SEC.1.
128128

129129
do {
@@ -257,7 +257,7 @@ extension P256 {
257257
public init<Bytes: RandomAccessCollection>(derRepresentation: Bytes) throws where Bytes.Element == UInt8 {
258258
let bytes = Array(derRepresentation)
259259

260-
// We have to try to parse this twice because we have no informaton about what kind of key this is.
260+
// We have to try to parse this twice because we have no information about what kind of key this is.
261261
// We try with PKCS#8 first, and then fall back to SEC.1.
262262

263263
do {
@@ -391,7 +391,7 @@ extension P384 {
391391
public init<Bytes: RandomAccessCollection>(derRepresentation: Bytes) throws where Bytes.Element == UInt8 {
392392
let bytes = Array(derRepresentation)
393393

394-
// We have to try to parse this twice because we have no informaton about what kind of key this is.
394+
// We have to try to parse this twice because we have no information about what kind of key this is.
395395
// We try with PKCS#8 first, and then fall back to SEC.1.
396396

397397
do {
@@ -525,7 +525,7 @@ extension P384 {
525525
public init<Bytes: RandomAccessCollection>(derRepresentation: Bytes) throws where Bytes.Element == UInt8 {
526526
let bytes = Array(derRepresentation)
527527

528-
// We have to try to parse this twice because we have no informaton about what kind of key this is.
528+
// We have to try to parse this twice because we have no information about what kind of key this is.
529529
// We try with PKCS#8 first, and then fall back to SEC.1.
530530

531531
do {
@@ -659,7 +659,7 @@ extension P521 {
659659
public init<Bytes: RandomAccessCollection>(derRepresentation: Bytes) throws where Bytes.Element == UInt8 {
660660
let bytes = Array(derRepresentation)
661661

662-
// We have to try to parse this twice because we have no informaton about what kind of key this is.
662+
// We have to try to parse this twice because we have no information about what kind of key this is.
663663
// We try with PKCS#8 first, and then fall back to SEC.1.
664664

665665
do {
@@ -793,7 +793,7 @@ extension P521 {
793793
public init<Bytes: RandomAccessCollection>(derRepresentation: Bytes) throws where Bytes.Element == UInt8 {
794794
let bytes = Array(derRepresentation)
795795

796-
// We have to try to parse this twice because we have no informaton about what kind of key this is.
796+
// We have to try to parse this twice because we have no information about what kind of key this is.
797797
// We try with PKCS#8 first, and then fall back to SEC.1.
798798

799799
do {

Sources/Crypto/Key Agreement/ECDH.swift.gyb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ extension ${CURVE} {
129129
public init<Bytes: RandomAccessCollection>(derRepresentation: Bytes) throws where Bytes.Element == UInt8 {
130130
let bytes = Array(derRepresentation)
131131

132-
// We have to try to parse this twice because we have no informaton about what kind of key this is.
132+
// We have to try to parse this twice because we have no information about what kind of key this is.
133133
// We try with PKCS#8 first, and then fall back to SEC.1.
134134

135135
do {

Sources/_CryptoExtras/ChaCha20CTR/ChaCha20CTR.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ extension Insecure {
3636
/// - nonce: A 12 byte nonce for ChaCha20 encryption. The nonce must be unique for every use of the key to seal data.
3737
/// - Returns: The encrypted ciphertext
3838
/// - Throws: CipherError errors
39-
/// - Warning: You most likely want to use the ChaChaPoly implemention with AuthenticatedData available at `Crypto.ChaChaPoly`
39+
/// - Warning: You most likely want to use the ChaChaPoly implementation with AuthenticatedData available at `Crypto.ChaChaPoly`
4040
public static func encrypt<
4141
Plaintext: DataProtocol
4242
>(

Tests/CryptoTests/Utils/XCTestUtils.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ extension XCTestCase {
4242
/// Unwraps the given optional value, or if it is nil, throws an error and
4343
/// registers an XCTest failure. Meant to be used in a test method that has
4444
/// been marked as `throws`.
45-
/// - Note: this is a replacement for `XCTUnwrap`, which is not availble
45+
/// - Note: this is a replacement for `XCTUnwrap`, which is not available
4646
/// in SPM command line builds as of this writing: <https://bugs.swift.org/browse/SR-11501>
4747
func unwrap<T>(_ optional: T?, file: StaticString = (#file), line: UInt = #line) throws -> T {
4848
guard let wrapped = optional else {

0 commit comments

Comments
 (0)