Skip to content

Commit e1cc74b

Browse files
committed
docs: fix typos
1 parent 416a57e commit e1cc74b

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

Tests/CryptoSwiftTests/ASN1Tests.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ final class ASN1Tests: XCTestCase {
140140
/// This tests decodes an RSA Public Key from a Base64 DER Encoded representation
141141
///
142142
/// This test enforces that
143-
/// 1) The decoding process yeilds the expected format.
144-
/// 2) The re-encoding of the data yeilds the exact same starting data.
143+
/// 1) The decoding process yields the expected format.
144+
/// 2) The re-encoding of the data yields the exact same starting data.
145145
func testANS1DERDecodingPublicKey() throws {
146146
/// An example of an RSA Public Key ASN1 DER Encoding
147147
///
@@ -211,8 +211,8 @@ final class ASN1Tests: XCTestCase {
211211
/// This tests decodes an RSA Private Key from a Base64 DER Encoded representation
212212
///
213213
/// This test enforces that
214-
/// 1) The decoding process yeilds the expected format.
215-
/// 2) The re-encoding of the data yeilds the exact same starting data.
214+
/// 1) The decoding process yields the expected format.
215+
/// 2) The re-encoding of the data yields the exact same starting data.
216216
func testANS1DERDecodingPrivateKey() throws {
217217
/// An example of an RSA Private Key ASN1 DER Encoding
218218
///
@@ -310,7 +310,7 @@ final class ASN1Tests: XCTestCase {
310310
}
311311
XCTAssertEqual(coefficient, Data(hex: "009c74545364466fe538e67149f41815334669ecc2245cd58120f350d20e5bc3ddd10855297a3cb93370d348b6b803e527c2e4cc42bfa3c852525586791abc48d2"))
312312

313-
// Ensure re-encoding the data yeilds the exact same starting data
313+
// Ensure re-encoding the data yields the exact same starting data
314314
let asn: ASN1.Node = .sequence(nodes: [
315315
.integer(data: version),
316316
.integer(data: n),
@@ -335,8 +335,8 @@ final class ASN1Tests: XCTestCase {
335335
/// This tests decodes an Encrypted RSA Private Key from a Base64 PEM Encoded representation
336336
///
337337
/// This test enforces that
338-
/// 1) The decoding process yeilds the expected format.
339-
/// 2) The re-encoding of the data yeilds the exact same starting data.
338+
/// 1) The decoding process yields the expected format.
339+
/// 2) The re-encoding of the data yields the exact same starting data.
340340
func testASN1DecodingEncryptedPEM() throws {
341341
/// ==========================
342342
/// Encrypted PEM Structure

Tests/CryptoSwiftTests/RSATests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,11 +425,11 @@ final class RSATests: XCTestCase {
425425
let encrypted = try rsa.encrypt(message.key.bytes, variant: variant)
426426
XCTAssertEqual(encrypted.toHexString(), Data(base64Encoded: message.value.encryptedMessage["algid:encrypt:RSA:raw"]!)!.bytes.toHexString(), "Encryption<\(test.key)>::Failed to encrypt the message `\(message.key)`")
427427

428-
// Decryption requires access to the Private Key, therefore attempting to decrpyt with only a public key should throw an error
428+
// Decryption requires access to the Private Key, therefore attempting to decrypt with only a public key should throw an error
429429
XCTAssertThrowsError(try rsa.decrypt(Data(base64Encoded: message.value.encryptedMessage["algid:encrypt:RSA:raw"]!)!.bytes), "Encryption<\(test.key)>::Did not throw error while decrypting `\(message.key)`")
430430
}
431431
} else {
432-
// Sometimes the message is too long to be safely encrypted by our key. When this happens we should encouter an error and our test value should be empty.
432+
// Sometimes the message is too long to be safely encrypted by our key. When this happens we should encounter an error and our test value should be empty.
433433
if test.value == "" {
434434
XCTAssertThrowsError(try rsa.encrypt(message.key.bytes, variant: variant), "Encryption<\(test.key)>::Did not throw error while encrypting `\(message.key)`")
435435
} else {

0 commit comments

Comments
 (0)