Skip to content

Commit 65ea4c5

Browse files
committed
minor fixes
1 parent 3d47d8e commit 65ea4c5

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

scram/client.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ proc verifyServerFinalMessage*(s: ScramClient, serverFinalMessage: string): bool
7373
var matches: array[1, string]
7474
if match(serverFinalMessage, SERVER_FINAL_MESSAGE, matches):
7575
let proposedServerSignature = base64.decode(matches[0])
76-
s.isSuccessful = proposedServerSignature == s.serverSignature
76+
s.isSuccessful = proposedServerSignature == $s.serverSignature
7777
result = s.isSuccessful
7878

7979
proc isSuccessful*(s: ScramClient): bool =

scram/server.nim

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ proc prepareFinalMessage*[T](s: ScramServer[T], clientFinalMessage: string): str
8989
clientKey ^= decodedProof
9090

9191
let resultKey = $HASH[T](clientKey)
92-
echo "Result Key: ", base64.encode(resultKey)
9392
if resultKey != storedKey:
9493
return nil
9594

@@ -135,7 +134,7 @@ when isMainModule:
135134
echo "Server final mesage: ", serverFinalMessage
136135

137136
assert client.verifyServerFinalMessage(serverFinalMessage) == true
138-
assert client.isSuccessful() == true
137+
echo "Client is successful: ", client.isSuccessful() == true
139138

140139

141140

0 commit comments

Comments
 (0)