Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #6 #7

Merged
merged 3 commits into from
Nov 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scram.nimble
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "0.1.6"
version = "0.1.7"
author = "Huy Doan"
description = "Salted Challenge Response Authentication Mechanism (SCRAM) "
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion scram/private/types.nim
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ type

const
GS2_HEADER* = "n,,"
INT_1* = "\x0\x0\x0\x1"
INT_1* = "\x00\x00\x00\x01"
CLIENT_KEY* = "Client Key"
SERVER_KEY* = "Server Key"
3 changes: 3 additions & 0 deletions scram/private/utils.nim
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import random, base64, strutils, types, hmac, sha1
from md5 import MD5Digest
from nimSHA2 import Sha256Digest, Sha512Digest

randomize()

proc `$`*(sha: Sha1Digest): string = sha.toHex()
Expand Down