Library : nimcx.nim
Module : cxhashes.nim
Status : stable
License : MIT opensource
Latest : 2020-05-14
Compiler : latest stable or devel branch
OS : Linux
Note : for more on hashes see https://github.com/c-blake/adix/blob/master/althash.nim
Description : provides convenience functions for hashes
Procs
proc checkHash[T](kata: string; hsx: T)
-
checkHash
checks hash of a string and print status
proc createHash(kata: string): auto {....raises: [], tags: [], forbids: [].}
-
createHash
returns hash of a string
Example
var zz = readLineFromStdin("Hash a string : ") # var zz = readPasswordFromStdin("Hash a string : ") # to do not show input string var ahash = createHash(zz) echo ahash checkHash(zz, ahash)
proc getGitHash(): string {....raises: [], tags: [], forbids: [].}
- getGitHash to get the git hash during compile
proc verifyHash[T](kata: string; hsx: T): bool
-
verifyHash
checks hash of a string and returns true or false