md5.html 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <!-- This file is generated by Nim. -->
  4. <html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en" lang="en" data-theme="auto">
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8. <title>src/checksums/md5</title>
  9. <!-- Google fonts -->
  10. <link href='https://fonts.googleapis.com/css?family=Lato:400,600,900' rel='stylesheet' type='text/css'/>
  11. <link href='https://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600' rel='stylesheet' type='text/css'/>
  12. <!-- Favicon -->
  13. <link rel="shortcut icon" href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAUAAAAF////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAIAAABbAAAAlQAAAKIAAACbAAAAmwAAAKIAAACVAAAAWwAAAAL///8A////AP///wD///8A////AAAAABQAAADAAAAAYwAAAA3///8A////AP///wD///8AAAAADQAAAGMAAADAAAAAFP///wD///8A////AP///wAAAACdAAAAOv///wD///8A////AP///wD///8A////AP///wD///8AAAAAOgAAAJ3///8A////AP///wAAAAAnAAAAcP///wAAAAAoAAAASv///wD///8A////AP///wAAAABKAAAAKP///wAAAABwAAAAJ////wD///8AAAAAgQAAABwAAACIAAAAkAAAAJMAAACtAAAAFQAAABUAAACtAAAAkwAAAJAAAACIAAAAHAAAAIH///8A////AAAAAKQAAACrAAAAaP///wD///8AAAAARQAAANIAAADSAAAARf///wD///8AAAAAaAAAAKsAAACk////AAAAADMAAACcAAAAnQAAABj///8A////AP///wAAAAAYAAAAGP///wD///8A////AAAAABgAAACdAAAAnAAAADMAAAB1AAAAwwAAAP8AAADpAAAAsQAAAE4AAAAb////AP///wAAAAAbAAAATgAAALEAAADpAAAA/wAAAMMAAAB1AAAAtwAAAOkAAAD/AAAA/wAAAP8AAADvAAAA3gAAAN4AAADeAAAA3gAAAO8AAAD/AAAA/wAAAP8AAADpAAAAtwAAAGUAAAA/AAAA3wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAADfAAAAPwAAAGX///8A////AAAAAEgAAADtAAAAvwAAAL0AAADGAAAA7wAAAO8AAADGAAAAvQAAAL8AAADtAAAASP///wD///8A////AP///wD///8AAAAAO////wD///8A////AAAAAIcAAACH////AP///wD///8AAAAAO////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A//8AAP//AAD4HwAA7/cAAN/7AAD//wAAoYUAAJ55AACf+QAAh+EAAAAAAADAAwAA4AcAAP5/AAD//wAA//8AAA=="/>
  14. <link rel="icon" type="image/png" sizes="32x32" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4QQQEwksSS9ZWwAAAk1JREFUWMPtll2ITVEUx39nn/O7Y5qR8f05wtCUUr6ZIS++8pEnkZInPImneaCQ5METNdOkeFBKUhMPRIkHKfEuUZSUlGlKPN2TrgfncpvmnntnmlEyq1Z7t89/rf9a6+y99oZxGZf/XeIq61EdtgKXgdXA0xrYAvBjOIF1AI9zvjcC74BSpndrJPkBWDScTF8Aa4E3wDlgHbASaANmVqlcCnwHvgDvgVfAJ+AikAAvgfVZwLnSVZHZaOuKoQi3ZOMi4NkYkpe1p4J7A8BpYAD49hfIy/oqG0+hLomiKP2L5L+1ubn5115S+3OAn4EnwBlgMzCjyt6ZAnQCJ4A7wOs88iRJHvw50HoujuPBoCKwHWiosy8MdfZnAdcHk8dxXFJ3VQbQlCTJvRBCGdRbD4M6uc5glpY3eAihpN5S5w12diSEcCCEcKUO4ljdr15T76ur1FDDLIQQ3qv71EdDOe3Kxj3leRXyk+pxdWnFWod6Wt2bY3de3aSuUHcPBVimHs7mK9WrmeOF6lR1o9qnzskh2ar2qm1qizpfXaPeVGdlmGN5pb09qMxz1Xb1kLqgzn1RyH7JUXW52lr5e/Kqi9qpto7V1atuUzfnARrV7jEib1T76gG2qxdGmXyiekkt1GswPTtek0aBfJp6YySGBfWg2tPQ0FAYgf1stUfdmdcjarbYJEniKIq6gY/Aw+zWHAC+p2labGpqiorFYgGYCEzN7oQdQClN07O1/EfDyGgC0ALMBdYAi4FyK+4H3gLPsxfR1zRNi+NP7nH5J+QntnXe5B5mpfQAAAAASUVORK5CYII=">
  15. <!-- CSS -->
  16. <link rel="stylesheet" type="text/css" href="nimdoc.out.css?v=2.3.1">
  17. <!-- JS -->
  18. <script type="text/javascript" src="dochack.js?v=2.3.1"></script>
  19. </head>
  20. <body>
  21. <div class="document" id="documentId">
  22. <div class="container">
  23. <h1 class="title">src/checksums/md5</h1>
  24. <div class="row">
  25. <div class="three columns">
  26. <div class="theme-select-wrapper">
  27. <label for="theme-select">Theme:&nbsp;</label>
  28. <select id="theme-select" onchange="setTheme(this.value)">
  29. <option value="auto">🌗 Match OS</option>
  30. <option value="dark">🌑 Dark</option>
  31. <option value="light">🌕 Light</option>
  32. </select>
  33. </div>
  34. <div id="global-links">
  35. <ul class="simple-boot">
  36. <li><a href="manual.html">Manual</a></li>
  37. <li><a href="lib.html">Standard library</a></li>
  38. <li> <a id="indexLink" href="theindex.html">Index</a></li>
  39. <li><a href="compiler/theindex.html">Compiler docs</a></li>
  40. <li><a href="https://nim-lang.github.io/fusion/theindex.html">Fusion docs</a></li>
  41. <li><a href="https://nim-lang.github.io/Nim/">devel</a>, <a href="https://nim-lang.org/documentation.html">stable</a></li>
  42. </ul>
  43. </div>
  44. <div id="searchInputDiv">
  45. Search: <input type="search" id="searchInput"
  46. oninput="search()" />
  47. </div>
  48. <ul class="simple simple-toc" id="toc-list">
  49. <li><a class="reference" id="see-also_toc" href="#see-also">See also</a></li>
  50. <li>
  51. <details open>
  52. <summary><a class="reference reference-toplevel" href="#7" id="57">Types</a></summary>
  53. <ul class="simple simple-toc-section">
  54. <li><a class="reference" href="#MD5Context" title="MD5Context {.final.} = object">MD5Context</a></li>
  55. <li><a class="reference" href="#MD5Digest" title="MD5Digest = array[0 .. 15, uint8]">MD5Digest</a></li>
  56. </ul>
  57. </details>
  58. </li>
  59. <li>
  60. <details open>
  61. <summary><a class="reference reference-toplevel" href="#12" id="62">Procs</a></summary>
  62. <ul class="simple simple-toc-section">
  63. <ul class="simple nested-toc-section">$
  64. <li><a class="reference" href="#%24%2CMD5Digest" title="`$`(d: MD5Digest): string">`$`(d: MD5Digest): string</a></li>
  65. </ul>
  66. <ul class="simple nested-toc-section">==
  67. <li><a class="reference" href="#%3D%3D%2CMD5Digest%2CMD5Digest" title="`==`(D1, D2: MD5Digest): bool">`==`(D1, D2: MD5Digest): bool</a></li>
  68. </ul>
  69. <ul class="simple nested-toc-section">getMD5
  70. <li><a class="reference" href="#getMD5%2Cstring" title="getMD5(s: string): string">getMD5(s: string): string</a></li>
  71. </ul>
  72. <ul class="simple nested-toc-section">md5Final
  73. <li><a class="reference" href="#md5Final%2CMD5Context%2CMD5Digest" title="md5Final(c: var MD5Context; digest: var MD5Digest)">md5Final(c: var MD5Context; digest: var MD5Digest)</a></li>
  74. </ul>
  75. <ul class="simple nested-toc-section">md5Init
  76. <li><a class="reference" href="#md5Init%2CMD5Context" title="md5Init(c: var MD5Context)">md5Init(c: var MD5Context)</a></li>
  77. </ul>
  78. <ul class="simple nested-toc-section">md5Update
  79. <li><a class="reference" href="#md5Update%2CMD5Context%2Ccstring%2Cint" title="md5Update(c: var MD5Context; input: cstring; len: int)">md5Update(c: var MD5Context; input: cstring; len: int)</a></li>
  80. <li><a class="reference" href="#md5Update%2CMD5Context%2CopenArray%5Buint8%5D" title="md5Update(c: var MD5Context; input: openArray[uint8])">md5Update(c: var MD5Context; input: openArray[uint8])</a></li>
  81. </ul>
  82. <ul class="simple nested-toc-section">toMD5
  83. <li><a class="reference" href="#toMD5%2Cstring" title="toMD5(s: string): MD5Digest">toMD5(s: string): MD5Digest</a></li>
  84. </ul>
  85. </ul>
  86. </details>
  87. </li>
  88. </ul>
  89. </div>
  90. <div class="nine columns" id="content">
  91. <div id="tocRoot"></div>
  92. <p class="module-desc"><div class="admonition admonition-info"><span class="admonition-info-text"><b>Note:</b></span>
  93. In order to use this module, run <tt class="docutils literal"><span class="pre"><span class="Identifier">nimble</span> <span class="Identifier">install</span> <span class="Identifier">checksums</span></span></tt>.</div>
  94. <p>Module for computing <a class="reference external" href="https://en.wikipedia.org/wiki/MD5">MD5 checksums</a>.</p>
  95. <p>Be aware that using MD5 for cryptographic purposes is <em>strongly</em> discouraged as it is no longer deemed secure enough even against consumer grade computational resources.</p>
  96. <p>This module also works at compile time and in JavaScript.</p>
  97. <h1><a class="toc-backref" id="see-also" href="#see-also">See also</a></h1><ul class="simple"><li><a class="reference external" href="base64.html">base64 module</a> for a Base64 encoder and decoder</li>
  98. <li><a class="reference external" href="sha1.html">std/sha1 module</a> for the SHA-1 checksum algorithm</li>
  99. <li><a class="reference external" href="sha2.html">std/sha2 module</a> for the SHA-2 checksum algorithm</li>
  100. <li><a class="reference external" href="sha3.html">std/sha3 module</a> for the SHA-3 checksum algorithm</li>
  101. <li><a class="reference external" href="hashes.html">hashes module</a> for efficient computations of hash values for diverse Nim types</li>
  102. </ul>
  103. </p>
  104. <div class="section" id="7">
  105. <h1><a class="toc-backref" href="#7">Types</a></h1>
  106. <dl class="item">
  107. <div id="MD5Context">
  108. <dt><pre><a href="md5.html#MD5Context"><span class="Identifier">MD5Context</span></a> {.<span class="Identifier">final</span>.} <span class="Other">=</span> <span class="Keyword">object</span></pre></dt>
  109. <dd>
  110. </dd>
  111. </div>
  112. <div id="MD5Digest">
  113. <dt><pre><a href="md5.html#MD5Digest"><span class="Identifier">MD5Digest</span></a> <span class="Other">=</span> <span class="Identifier">array</span><span class="Other">[</span><span class="DecNumber">0</span> <span class="Operator">..</span> <span class="DecNumber">15</span><span class="Other">,</span> <span class="Identifier">uint8</span><span class="Other">]</span></pre></dt>
  114. <dd>
  115. MD5 checksum of a string, obtained with the <a class="reference external" href="#toMD5,string">toMD5 proc</a>.
  116. </dd>
  117. </div>
  118. </dl>
  119. </div>
  120. <div class="section" id="12">
  121. <h1><a class="toc-backref" href="#12">Procs</a></h1>
  122. <dl class="item">
  123. <div id="$-procs-all">
  124. <div id="$,MD5Digest">
  125. <dt><pre><span class="Keyword">proc</span> <a href="#%24%2CMD5Digest"><span class="Identifier">`$`</span></a><span class="Other">(</span><span class="Identifier">d</span><span class="Other">:</span> <a href="md5.html#MD5Digest"><span class="Identifier">MD5Digest</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">string</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  126. <dd>
  127. Converts a <tt class="docutils literal"><span class="pre"><span class="Identifier">MD5Digest</span></span></tt> value into its string representation.
  128. </dd>
  129. </div>
  130. </div>
  131. <div id="==-procs-all">
  132. <div id="==,MD5Digest,MD5Digest">
  133. <dt><pre><span class="Keyword">proc</span> <a href="#%3D%3D%2CMD5Digest%2CMD5Digest"><span class="Identifier">`==`</span></a><span class="Other">(</span><span class="Identifier">D1</span><span class="Other">,</span> <span class="Identifier">D2</span><span class="Other">:</span> <a href="md5.html#MD5Digest"><span class="Identifier">MD5Digest</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">bool</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  134. <dd>
  135. Checks if two <tt class="docutils literal"><span class="pre"><span class="Identifier">MD5Digest</span></span></tt> values are identical.
  136. </dd>
  137. </div>
  138. </div>
  139. <div id="getMD5-procs-all">
  140. <div id="getMD5,string">
  141. <dt><pre><span class="Keyword">proc</span> <a href="#getMD5%2Cstring"><span class="Identifier">getMD5</span></a><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Identifier">string</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">string</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  142. <dd>
  143. <p>Computes an MD5 value of <tt class="docutils literal"><span class="pre"><span class="Identifier">s</span></span></tt> and returns its string representation.</p>
  144. <p><strong>See also:</strong></p>
  145. <ul class="simple"><li><a class="reference external" href="#toMD5,string">toMD5 proc</a> which returns the <tt class="docutils literal"><span class="pre"><span class="Identifier">MD5Digest</span></span></tt> of a string</li>
  146. </ul>
  147. <p><strong class="examples_text">Example:</strong></p>
  148. <pre class="listing"><span class="Identifier">assert</span> <span class="Identifier">getMD5</span><span class="Punctuation">(</span><span class="StringLit">&quot;abc&quot;</span><span class="Punctuation">)</span> <span class="Operator">==</span> <span class="StringLit">&quot;900150983cd24fb0d6963f7d28e17f72&quot;</span></pre>
  149. </dd>
  150. </div>
  151. </div>
  152. <div id="md5Final-procs-all">
  153. <div id="md5Final,MD5Context,MD5Digest">
  154. <dt><pre><span class="Keyword">proc</span> <a href="#md5Final%2CMD5Context%2CMD5Digest"><span class="Identifier">md5Final</span></a><span class="Other">(</span><span class="Identifier">c</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="md5.html#MD5Context"><span class="Identifier">MD5Context</span></a><span class="Other">;</span> <span class="Identifier">digest</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="md5.html#MD5Digest"><span class="Identifier">MD5Digest</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
  155. <span class="Identifier">gcsafe</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  156. <dd>
  157. </dd>
  158. </div>
  159. </div>
  160. <div id="md5Init-procs-all">
  161. <div id="md5Init,MD5Context">
  162. <dt><pre><span class="Keyword">proc</span> <a href="#md5Init%2CMD5Context"><span class="Identifier">md5Init</span></a><span class="Other">(</span><span class="Identifier">c</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="md5.html#MD5Context"><span class="Identifier">MD5Context</span></a><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">gcsafe</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  163. <dd>
  164. </dd>
  165. </div>
  166. </div>
  167. <div id="md5Update-procs-all">
  168. <div id="md5Update,MD5Context,cstring,int">
  169. <dt><pre><span class="Keyword">proc</span> <a href="#md5Update%2CMD5Context%2Ccstring%2Cint"><span class="Identifier">md5Update</span></a><span class="Other">(</span><span class="Identifier">c</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="md5.html#MD5Context"><span class="Identifier">MD5Context</span></a><span class="Other">;</span> <span class="Identifier">input</span><span class="Other">:</span> <span class="Identifier">cstring</span><span class="Other">;</span> <span class="Identifier">len</span><span class="Other">:</span> <span class="Identifier">int</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
  170. <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">gcsafe</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  171. <dd>
  172. <p>Updates the <tt class="docutils literal"><span class="pre"><span class="Identifier">MD5Context</span></span></tt> with the <tt class="docutils literal"><span class="pre"><span class="Identifier">input</span></span></tt> data of length <tt class="docutils literal"><span class="pre"><span class="Identifier">len</span></span></tt>.</p>
  173. <p>If you use the <a class="reference external" href="#toMD5,string">toMD5 proc</a>, there's no need to call this function explicitly.</p>
  174. </dd>
  175. </div>
  176. <div id="md5Update,MD5Context,openArray[uint8]">
  177. <dt><pre><span class="Keyword">proc</span> <a href="#md5Update%2CMD5Context%2CopenArray%5Buint8%5D"><span class="Identifier">md5Update</span></a><span class="Other">(</span><span class="Identifier">c</span><span class="Other">:</span> <span class="Keyword">var</span> <a href="md5.html#MD5Context"><span class="Identifier">MD5Context</span></a><span class="Other">;</span> <span class="Identifier">input</span><span class="Other">:</span> <span class="Identifier">openArray</span><span class="Other">[</span><span class="Identifier">uint8</span><span class="Other">]</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
  178. <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">gcsafe</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  179. <dd>
  180. </dd>
  181. </div>
  182. </div>
  183. <div id="toMD5-procs-all">
  184. <div id="toMD5,string">
  185. <dt><pre><span class="Keyword">proc</span> <a href="#toMD5%2Cstring"><span class="Identifier">toMD5</span></a><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <span class="Identifier">string</span><span class="Other">)</span><span class="Other">:</span> <a href="md5.html#MD5Digest"><span class="Identifier">MD5Digest</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  186. <dd>
  187. <p>Computes the <tt class="docutils literal"><span class="pre"><span class="Identifier">MD5Digest</span></span></tt> value for a string <tt class="docutils literal"><span class="pre"><span class="Identifier">s</span></span></tt>.</p>
  188. <p><strong>See also:</strong></p>
  189. <ul class="simple"><li><a class="reference external" href="#getMD5,string">getMD5 proc</a> which returns a string representation of the <tt class="docutils literal"><span class="pre"><span class="Identifier">MD5Digest</span></span></tt></li>
  190. <li><a class="reference external" href="#$,MD5Digest">$ proc</a> for converting MD5Digest to string</li>
  191. </ul>
  192. <p><strong class="examples_text">Example:</strong></p>
  193. <pre class="listing"><span class="Identifier">assert</span> <span class="Operator">$</span><span class="Identifier">toMD5</span><span class="Punctuation">(</span><span class="StringLit">&quot;abc&quot;</span><span class="Punctuation">)</span> <span class="Operator">==</span> <span class="StringLit">&quot;900150983cd24fb0d6963f7d28e17f72&quot;</span></pre>
  194. </dd>
  195. </div>
  196. </div>
  197. </dl>
  198. </div>
  199. </div>
  200. </div>
  201. <div class="twelve-columns footer">
  202. <span class="nim-sprite"></span>
  203. <br>
  204. <small style="color: var(--hint);">Made with Nim. Generated: 2024-12-25 13:28:34 UTC</small>
  205. </div>
  206. </div>
  207. </div>
  208. <script defer data-domain="nim-lang.org" src="https://plausible.io/js/plausible.js"></script>
  209. </body>
  210. </html>