Skip to content

Commit

Permalink
Typos
Browse files Browse the repository at this point in the history
  • Loading branch information
philips77 committed Oct 17, 2023
1 parent 7f12631 commit 1c614b2
Show file tree
Hide file tree
Showing 15 changed files with 24 additions and 24 deletions.
6 changes: 3 additions & 3 deletions nRFMeshProvision/Crypto/Crypto.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ internal class Crypto {
}

/// Obfuscates or deobfuscates given data by XORing it with PECB, which is
/// caluclated by encrypting Privacy Plaintext (encrypted data (used as Privacy
/// calculated by encrypting Privacy Plaintext (encrypted data (used as Privacy
/// Random) and IV Index) using the given key.
///
/// - parameters:
Expand Down Expand Up @@ -207,7 +207,7 @@ internal class Crypto {
}

/// Encrypts given data using the Encryption Key, Nonce and adds MIC
/// (Message Integrity Check) of given size to the end of the returned ciphertext.
/// (Message Integrity Check) of given size to the end of the returned cipher text.
///
/// - parameters:
/// - data: The data to be encrypted and authenticated, also known as plaintext.
Expand All @@ -221,7 +221,7 @@ internal class Crypto {
return calculateCCM(data, withKey: key, nonce: nonce, andMICSize: size, withAdditionalData: aad)
}

/// Decrypts given ciphertext using the Encryption Key, Nonce and valudates its
/// Decrypts given cipher text using the Encryption Key, Nonce and validates its
/// integrity using the MIC (Message Integrity Check).
///
/// - parameters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ internal struct ControlMessage: LowerTransportPdu {
/// - parameters:
/// - message: The message to be sent.
/// - source: The address of the local Node.
/// - networkKey: The Network Key to signe the message with.
/// - networkKey: The Network Key to sign the message with.
/// The key should be known to the connected
/// Proxy Node.
/// - ivIndex: The current IV Index of the mesh network.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ internal class LowerTransportLayer {
/// to a Unicast Address.
private var unicastRetransmissionsTimers: [UInt16 : BackgroundTimer]
/// The map contains the number of remaining retransmissions and the number
/// of remaininig retransmissions without progress of a segmented message
/// of remaining retransmissions without progress of a segmented message
/// that is sent to a Unicast Address.
///
/// The number of retransmissions without progress is reset to its initial value each time a
Expand Down
4 changes: 2 additions & 2 deletions nRFMeshProvision/Mesh Model/Address.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import Foundation

/// Bluetooth Mesh address type. Type alias for `UInt16`.
///
/// In Bluetooth mesh addresses are devided into several categories:
/// In Bluetooth mesh addresses are divided into several categories:
/// - Unassigned Address - address 0x0000.
/// - Unicast Addresses - a unique address of an ``Element``.
/// - Group Address - a group address allows sending messages to multiple receivers.
Expand Down Expand Up @@ -83,7 +83,7 @@ public extension Address {
/// Primary Element of all nodes.
///
/// That means, that all Models on the Primary Element of all the Nodes
/// are automatically subscibed to all-nodes address. It is not possible
/// are automatically subscribed to all-nodes address. It is not possible
/// for Models on other Elements to receive messages sent to All Nodes address,
/// as they cannot subscribe to this address.
static let allNodes: Address = 0xFFFF
Expand Down
2 changes: 1 addition & 1 deletion nRFMeshProvision/Mesh Model/MeshNetwork.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import Foundation
/// The configuration does not contain any sequence numbers, IV Index, or other
/// network properties that change without the action from the Provisioner.
///
/// The structire of this class is compatible with Mesh Configuration Database 1.0.1.
/// The structure of this class is compatible with Mesh Configuration Database 1.0.1.
public class MeshNetwork: Codable {
/// Random 128-bit UUID allows differentiation among multiple mesh networks.
public let uuid: UUID
Expand Down
4 changes: 2 additions & 2 deletions nRFMeshProvision/Mesh Model/Model.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ import Foundation
/// A Model may extend another Model. Models in Extend relationship may share states.
/// A Model which does not extend any other Model is called a *base* Model.
///
/// Models in Extend relationship located on the same Element share the Subsctiption List.
/// Models in Extend relationship located on the same Element share the Subscription List.
public class Model: Codable {
/// Bluetooth SIG or vendor-assigned model identifier.
///
/// In case of vendor models the 2 most significant bytes of this property are
/// the Company Identifier, as registersd in Bluetooth SIG Assigned Numbers database.
/// the Company Identifier, as registered in Bluetooth SIG Assigned Numbers database.
///
/// For Bluetooth SIG defined models these 2 bytes are `0x0000`.
///
Expand Down
2 changes: 1 addition & 1 deletion nRFMeshProvision/Mesh Model/NetworkKey.swift
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public class NetworkKey: Key, Codable {
self.name = name
self.index = index
self.key = key
// Initially, a Network Key is consideded secure, as there are no Nodes
// Initially, a Network Key is considered secure, as there are no Nodes
// that know it other than the Provisioner's one.
self.minSecurity = .secure
self.timestamp = Date()
Expand Down
2 changes: 1 addition & 1 deletion nRFMeshProvision/Mesh Model/Node.swift
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ public class Node: Codable {
friend: .notSupported,
lowPower: .notSupported)

// Keys will ba added later.
// Keys will be added later.
self.netKeys = []
self.appKeys = []
// Initialize elements.
Expand Down
2 changes: 1 addition & 1 deletion nRFMeshProvision/Mesh Model/NodeIdentity.swift
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public struct PrivateNodeIdentity: NodeIdentity {
extension PublicNodeIdentity: CustomDebugStringConvertible {

public var debugDescription: String {
return "Node Identity (hash: 0x\(hash.hex), 0xrandom: \(random.hex))"
return "Node Identity (hash: 0x\(hash.hex), random: 0x\(random.hex))"
}

}
Expand Down
6 changes: 3 additions & 3 deletions nRFMeshProvision/Mesh Model/Publish.swift
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public struct Publish: Codable, Equatable {
/// - friendshipCredentialsFlag: `True`, to use Friendship Security Material,
/// `false` to use Master Security Material (default).
/// - ttl: Time To Live. The TTL is decremented every time the message is relayed,
/// until it reaches 1, after which the message is not relayed furhter.
/// until it reaches 1, after which the message is not relayed further.
/// Messages with TTL set to 0 are not relayed, and only sent to Nodes in
/// direct proximity. Use 0xFF to use Node's default TTL.
/// - period: Periodical publication interval. See ``Publish/Period-swift.struct``
Expand All @@ -261,7 +261,7 @@ public struct Publish: Codable, Equatable {
/// - friendshipCredentialsFlag: `True`, to use Friendship Security Material,
/// `false` to use Master Security Material (default).
/// - ttl: Time To Live. The TTL is decremented every time the message is relayed,
/// until it reaches 1, after which the message is not relayed furhter.
/// until it reaches 1, after which the message is not relayed further.
/// Messages with TTL set to 0 are not relayed, and only sent to Nodes in
/// direct proximity. Use 0xFF to use Node's default TTL.
/// - periodSteps: Period steps, together with the period resolution are used to
Expand Down Expand Up @@ -463,7 +463,7 @@ extension Publish.Period: CustomDebugStringConvertible {
private extension Publish.Period {

/// This method implements a workaround for importing publish resolution
/// exported from nRF Mesh in version 3.0.1 or older, where it was multipled
/// exported from nRF Mesh in version 3.0.1 or older, where it was multiplied
/// by the number of steps.
///
/// E.g. 40 seconds would be exported as:
Expand Down
2 changes: 1 addition & 1 deletion nRFMeshProvision/Provisioning/Algorithm.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public enum Algorithm {
/// BTM ECDH P256 HMAC SHA256 AES CCM algorithm will be used to calculate the
/// shared secret.
///
/// This algorithm must be supported by devices claming support with Mesh Protocol 1.1.
/// This algorithm must be supported by devices claiming support with Mesh Protocol 1.1.
///
/// - since: Mesh Protocol 1.1.
case BTM_ECDH_P256_HMAC_SHA256_AES_CCM
Expand Down
4 changes: 2 additions & 2 deletions nRFMeshProvision/Provisioning/Oob.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public struct OobInformation: OptionSet {
return nil
}

// OOB Information is using Little Endian in the Advertsing Data.
// OOB Information is using Little Endian in the Advertising Data.
rawValue = data.read(fromOffset: 16)
}

Expand Down Expand Up @@ -145,7 +145,7 @@ public enum InputAction: UInt8 {
///
/// The value generator is used in Provisioning with an Input Action used as OOB.
///
/// The default implementation provides random values. It should only be overriden
/// The default implementation provides random values. It should only be overridden
/// if you need to know the values in advance, for example for testing.
open class InputActionValueGenerator {
/// This method should generate a random alphanumeric capitalize string of given size.
Expand Down
6 changes: 3 additions & 3 deletions nRFMeshProvision/Provisioning/ProvisioningPdu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

import Foundation

/// The Provisioniong Pdu.
/// The Provisioning Pdu.
internal typealias ProvisioningPdu = Data

/// Provisioning PDU Type.
Expand Down Expand Up @@ -136,7 +136,7 @@ public enum ProvisioningRequest {

}

/// Provisioning respones are sent by the Provisionee to the Provisioner
/// Provisioning responses are sent by the Provisionee to the Provisioner
/// as a response to ``ProvisioningRequest``.
public enum ProvisioningResponse {
/// The Provisionee sends a Provisioning Capabilities PDU to indicate its
Expand Down Expand Up @@ -212,7 +212,7 @@ public enum ProvisioningResponse {
}
}

// MARK: - String convertion
// MARK: - String conversion

extension ProvisioningPduType: CustomDebugStringConvertible {

Expand Down
2 changes: 1 addition & 1 deletion nRFMeshProvision/Provisioning/ProvisioningState.swift
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public enum RemoteProvisioningError: UInt8 {
case invalidData = 9
}

/// A set of authentication actions aiming to strengthen device provisioniong
/// A set of authentication actions aiming to strengthen device provisioning
/// security.
public enum AuthAction {
/// The user shall provide 16 byte OOB Static Key.
Expand Down
2 changes: 1 addition & 1 deletion nRFMeshProvision/Utils/Beacon.swift
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public extension Dictionary where Key == String, Value == Any {
/// - note: Before version 4.0.0 this property returned Data object.
/// The API changed was made due to introduction of Private Network Identity
/// advertising packets, which don't contain the Network ID directly,
/// but still can identify a network cryptographicaly.
/// but still can identify a network cryptographically.
/// - seeAlso: ``NetworkIdentity/matches(networkKey:)``
/// - seeAlso: ``MeshNetwork/matches(networkIdentity:)``
/// - since: 4.0.0
Expand Down

0 comments on commit 1c614b2

Please sign in to comment.