Documentation - Typos (#179)

This commit is contained in:
Joey authored and GitHub committed 2023-04-24 01:50:32 -07:00
1 parent 33a20e650c
commit dcf0815f8f
6 files changed
+11 -11

No files matched your search

+1 -1
View File
@@ -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.
+1 -1
View File
@@ -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 {
+6 -6
View File
@@ -123,7 +123,7 @@ extension P256 {
public init<Bytes: RandomAccessCollection>(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<Bytes: RandomAccessCollection>(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<Bytes: RandomAccessCollection>(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<Bytes: RandomAccessCollection>(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<Bytes: RandomAccessCollection>(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<Bytes: RandomAccessCollection>(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 {
+1 -1
View File
@@ -129,7 +129,7 @@ extension ${CURVE} {
public init<Bytes: RandomAccessCollection>(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 {
@@ -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
>(
+1 -1
View File
@@ -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: <https://bugs.swift.org/browse/SR-11501>
func unwrap<T>(_ optional: T?, file: StaticString = (#file), line: UInt = #line) throws -> T {
guard let wrapped = optional else {