W3cubDocs

/Nim

Module md5

Module for computing MD5 checksums.

Types

MD5Digest = array[0 .. 15, uint8]
MD5Context {...}{.final.} = object
  state: MD5State
  count: array[0 .. 1, uint32]
  buffer: MD5Buffer

Procs

proc md5Init(c: var MD5Context) {...}{.raises: [], tags: [].}
initializes a MD5Context
proc md5Update(c: var MD5Context; input: cstring; len: int) {...}{.raises: [], tags: [].}
updates the MD5Context with the input data of length len
proc md5Final(c: var MD5Context; digest: var MD5Digest) {...}{.raises: [], tags: [].}
finishes the MD5Context and stores the result in digest
proc toMD5(s: string): MD5Digest {...}{.raises: [], tags: [].}
computes the MD5Digest value for a string s
proc `$`(d: MD5Digest): string {...}{.raises: [], tags: [].}
converts a MD5Digest value into its string representation
proc getMD5(s: string): string {...}{.raises: [], tags: [].}
computes an MD5 value of s and returns its string representation
proc `==`(D1, D2: MD5Digest): bool {...}{.raises: [], tags: [].}
checks if two MD5Digest values are identical

© 2006–2018 Andreas Rumpf
Licensed under the MIT License.
https://nim-lang.org/docs/md5.html