Skip to content

Commit

Permalink
Merge pull request #1050 from dropbigfish/main
Browse files Browse the repository at this point in the history
chore: fix some comments
  • Loading branch information
krzyzanowskim authored Oct 15, 2024
2 parents 6d7c104 + c1d9917 commit 47ed1f3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Sources/CryptoSwift/AES.swift
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ public final class AES: BlockCipher {
let rounds = self.variantNr
let rk = self.expandedKeyInv

// Save miliseconds by not using `block.toUInt32Array()`
// Save milliseconds by not using `block.toUInt32Array()`
let b00 = UInt32(block[block.startIndex.advanced(by: 0)])
let b01 = UInt32(block[block.startIndex.advanced(by: 1)]) << 8
let b02 = UInt32(block[block.startIndex.advanced(by: 2)]) << 16
Expand Down
2 changes: 1 addition & 1 deletion Sources/CryptoSwift/CMAC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public class CMAC: Authenticator {
// MARK: Helper methods

/**
Performs left shift by one bit to the bit string aquired after concatenating al bytes in the byte array
Performs left shift by one bit to the bit string acquired after concatenating al bytes in the byte array
- parameters:
- bytes: byte array
- returns: bit shifted bit string split again in array of bytes
Expand Down
2 changes: 1 addition & 1 deletion Sources/CryptoSwift/StreamDecryptor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ final class StreamDecryptor: Cryptor, Updatable {
plaintext = Array(try finalizingWorker.didDecryptLast(bytes: plaintext.slice))
}

// omit unecessary calculation if not needed
// omit unnecessary calculation if not needed
if self.padding != .noPadding {
self.lastBlockRemainder = plaintext.count.quotientAndRemainder(dividingBy: self.blockSize).remainder
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/CryptoSwift/StreamEncryptor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ final class StreamEncryptor: Cryptor, Updatable {
encrypted += self.worker.encrypt(block: chunk)
}

// omit unecessary calculation if not needed
// omit unnecessary calculation if not needed
if self.padding != .noPadding {
self.lastBlockRemainder = encrypted.count.quotientAndRemainder(dividingBy: self.blockSize).remainder
}
Expand Down

0 comments on commit 47ed1f3

Please sign in to comment.