diff --git a/scram.nimble b/scram.nimble index 85a8404..00ea346 100644 --- a/scram.nimble +++ b/scram.nimble @@ -1,4 +1,4 @@ -version = "0.1.6" +version = "0.1.7" author = "Huy Doan" description = "Salted Challenge Response Authentication Mechanism (SCRAM) " license = "MIT" diff --git a/scram/private/types.nim b/scram/private/types.nim index 96aff92..c38a8ee 100644 --- a/scram/private/types.nim +++ b/scram/private/types.nim @@ -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" diff --git a/scram/private/utils.nim b/scram/private/utils.nim index b436385..bee0b59 100644 --- a/scram/private/utils.nim +++ b/scram/private/utils.nim @@ -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()