Add simple tests to secure_hash

This commit is contained in:
Flaviu Tamas
2015-05-23 14:40:33 -04:00
parent e9516e6308
commit badc3a0929

View File

@@ -42,6 +42,11 @@ proc `==`*(a, b: SecureHash): bool =
SHA1Digest(a) == SHA1Digest(b)
when isMainModule:
let hash1 = secureHash("a93tgj0p34jagp9[agjp98ajrhp9aej]")
doAssert hash1 == hash1
doAssert parseSecureHash($hash1) == hash1
# Copyright (c) 2011, Micael Hildenborg
# All rights reserved.