Skip to content

Commit

Permalink
update expectedPublicKeySize
Browse files Browse the repository at this point in the history
  • Loading branch information
consuelita committed Oct 30, 2023
1 parent e595731 commit 5bffa80
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Sources/Nametag/Nametag.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Transmission
public struct Nametag
{
static let challengeSize: Int = 64
static let expectedPublicKeySize: Int = 32
static let expectedPublicKeySize: Int = 65
static let expectedSignatureSize: Int = 64

static public func check(challenge: Data, clientPublicKey: PublicKey, signature: Signature) throws
Expand Down Expand Up @@ -64,9 +64,9 @@ public struct Nametag
self.publicKey = privateSigningKey.publicKey
}

public func prove(challenage: Data) throws -> Signature
public func prove(challenge: Data) throws -> Signature
{
return try self.privateKey.signature(for: challenage)
return try self.privateKey.signature(for: challenge)
}

public func proveLive(connection: Transmission.Connection) throws
Expand All @@ -91,7 +91,7 @@ public struct Nametag
throw NametagError.noChallengeReceived
}

let result = try self.prove(challenage: challenge)
let result = try self.prove(challenge: challenge)
let resultData = result.data

guard resultData.count == Nametag.expectedSignatureSize else
Expand Down

0 comments on commit 5bffa80

Please sign in to comment.