SHA256.h.html 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <?xml version='1.0' encoding='iso-8859-1'?>
  2. <!doctype html public '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
  3. <html xmlns='http://www.w3c.org/1999/xhtml' lang='en-us'>
  4. <head>
  5. <title>
  6. SHA256.h
  7. </title>
  8. <meta http-equiv='content-type' content='text/html;iso-8859-1'/>
  9. <meta name='generator' content='motley-tools 1.9.4 13:40:33 Feb 18 2015'/>
  10. <meta name='author' content='cmaier@cmassoc.net'/>
  11. <meta name='robots' content='noindex,nofollow'/>
  12. <link href='toolkit.css' rel='stylesheet' type='text/css'/>
  13. </head>
  14. <body>
  15. <div class='headerlink'>
  16. [<a href='serial.h.html' title=' serial.h '>PREV</a>]
  17. [<a href='toolkit.html' title=' Index '>HOME</a>]
  18. [<a href='sizes.h.html' title=' sizes.h '>NEXT</a>]
  19. </div>
  20. <pre>
  21. /*====================================================================*
  22. *
  23. * SHA256.h - SHA256 encryption declarations and definitions;
  24. *
  25. * Motley Tools by Charles Maier &lt;cmaier@cmassoc.net&gt;;
  26. * Copyright (c) 2001-2006 by Charles Maier Associates;
  27. * Licensed under the Internet Software Consortium License;
  28. *
  29. *--------------------------------------------------------------------*/
  30. #ifndef SHA256_HEADER
  31. #define SHA256_HEADER
  32. /*====================================================================*
  33. * system header files;
  34. *--------------------------------------------------------------------*/
  35. #include &lt;stdint.h&gt;
  36. #include &lt;string.h&gt;
  37. /*====================================================================*
  38. * constants;
  39. *--------------------------------------------------------------------*/
  40. #define SHA256_DIGEST_LENGTH 256/8
  41. /*====================================================================*
  42. * variables;
  43. *--------------------------------------------------------------------*/
  44. typedef struct sha256
  45. {
  46. uint32_t count [2];
  47. uint32_t state [8];
  48. uint8_t block [64];
  49. uint8_t extra [64];
  50. }
  51. SHA256;
  52. /*====================================================================*
  53. * functions;
  54. *--------------------------------------------------------------------*/
  55. void SHA256Reset (struct sha256 * sha256);
  56. void SHA256Write (struct sha256 * sha256, void const * memory, size_t extent);
  57. void SHA256Block (struct sha256 * sha256, void const * memory);
  58. void SHA256Fetch (struct sha256 * sha256, uint8_t digest []);
  59. void SHA256Print (const uint8_t digest [], char const * string);
  60. void SHA256Ident (signed fd, uint8_t digest []);
  61. signed SHA256Match (signed fd, const uint8_t digest []);
  62. /*====================================================================*
  63. *
  64. *--------------------------------------------------------------------*/
  65. #endif
  66. </pre>
  67. <div class='footerlink'>
  68. [<a href='serial.h.html' title=' serial.h '>PREV</a>]
  69. [<a href='toolkit.html' title=' Index '>HOME</a>]
  70. [<a href='sizes.h.html' title=' sizes.h '>NEXT</a>]
  71. </div>
  72. </body>
  73. </html>