mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-19 07:21:19 +00:00
Add simple tests to secure_hash
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user