Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > d1d38291248b5ff58339d3d2ddb22ecd > files > 883

lib64beecrypt-devel-4.2.1-13.mga4.x86_64.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>BeeCrypt: include/beecrypt/sha256.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">BeeCrypt
   &#160;<span id="projectnumber">4.2.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_7519372152c32ce484a8cde0fb6b8cd0.html">beecrypt</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">sha256.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="sha256_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright (c) 2000, 2001, 2002 X-Way Rights BV</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * This library is free software; you can redistribute it and/or</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * modify it under the terms of the GNU Lesser General Public</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * License as published by the Free Software Foundation; either</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * version 2.1 of the License, or (at your option) any later version.</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * This library is distributed in the hope that it will be useful,</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * Lesser General Public License for more details.</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * You should have received a copy of the GNU Lesser General Public</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> * License along with this library; if not, write to the Free Software</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#ifndef _SHA256_H</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define _SHA256_H</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="beecrypt_8h.html">beecrypt/beecrypt.h</a>&quot;</span></div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="structsha256Param.html">   35</a></span>&#160;<span class="preprocessor"></span><span class="keyword">struct </span><a class="code" href="api_8h.html#a4f699d64328623c51b22f3b3f1ff4150">BEECRYPTAPI</a> <a class="code" href="structsha256Param.html">sha256Param</a></div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;#else</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;struct _sha256Param</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;#endif</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;{</div>
<div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="structsha256Param.html#af77f70abf483b4bbf1628ef62dd1d540">   42</a></span>&#160;    uint32_t h[8];</div>
<div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="structsha256Param.html#a020ba638a155d4024288cf40da165727">   45</a></span>&#160;    uint32_t data[64];</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;<span class="preprocessor">    #if (MP_WBITS == 64)</span></div>
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="structsha256Param.html#a88d133820707fc21e87155cf7a2b0760">   51</a></span>&#160;<span class="preprocessor"></span>    <a class="code" href="api_8h.html#a8de7ba63f011c81fa7f87724104d774b">mpw</a> length[1];</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="preprocessor">    #elif (MP_WBITS == 32)</span></div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="preprocessor"></span>    <a class="code" href="api_8h.html#a8de7ba63f011c81fa7f87724104d774b">mpw</a> length[2];</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;<span class="preprocessor">    #else</span></div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;<span class="preprocessor"></span><span class="preprocessor">    # error</span></div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="preprocessor"></span><span class="preprocessor">    #endif</span></div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="structsha256Param.html#afc003250fd4dc2ece3927ab12bb25752">   61</a></span>&#160;    uint32_t <a class="code" href="structsha256Param.html#afc003250fd4dc2ece3927ab12bb25752">offset</a>;</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;};</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;<span class="preprocessor">#ifndef __cplusplus</span></div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;<span class="preprocessor"></span><span class="keyword">typedef</span> <span class="keyword">struct </span>_sha256Param <a class="code" href="structsha256Param.html">sha256Param</a>;</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;<span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;<span class="keyword">extern</span> <a class="code" href="api_8h.html#a4f699d64328623c51b22f3b3f1ff4150">BEECRYPTAPI</a> <span class="keyword">const</span> <a class="code" href="structhashFunction.html">hashFunction</a> <a class="code" href="sha256_8h.html#a679979280ae9498651049fe553f9afae">sha256</a>;</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;<a class="code" href="api_8h.html#a4f699d64328623c51b22f3b3f1ff4150">BEECRYPTAPI</a></div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;<span class="keywordtype">void</span> <a class="code" href="sha256_8h.html#a0e0db13a02e016e19a677057e472960f">sha256Process</a>(<a class="code" href="structsha256Param.html">sha256Param</a>* sp);</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;<a class="code" href="api_8h.html#a4f699d64328623c51b22f3b3f1ff4150">BEECRYPTAPI</a></div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;<span class="keywordtype">int</span>  <a class="code" href="sha256_8h.html#af74134022427bead53c88a7396fe09bb">sha256Reset</a>  (<a class="code" href="structsha256Param.html">sha256Param</a>* sp);</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;<a class="code" href="api_8h.html#a4f699d64328623c51b22f3b3f1ff4150">BEECRYPTAPI</a></div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;<span class="keywordtype">int</span>  <a class="code" href="sha256_8h.html#ad319a7f3170b74c82543b0f9445716d1">sha256Update</a> (<a class="code" href="structsha256Param.html">sha256Param</a>* sp, <span class="keyword">const</span> <a class="code" href="api_8h.html#ab8ef12fab634c171394422d0ee8baf94">byte</a>* data, <span class="keywordtype">size_t</span> size);</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;<a class="code" href="api_8h.html#a4f699d64328623c51b22f3b3f1ff4150">BEECRYPTAPI</a></div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;<span class="keywordtype">int</span>  <a class="code" href="sha256_8h.html#ac0c9981d67a9dcda8e091bafa70cc944">sha256Digest</a> (<a class="code" href="structsha256Param.html">sha256Param</a>* sp, <a class="code" href="api_8h.html#ab8ef12fab634c171394422d0ee8baf94">byte</a>* digest);</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;<span class="preprocessor"></span>}</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="ttc" id="sha256_8h_html_af74134022427bead53c88a7396fe09bb"><div class="ttname"><a href="sha256_8h.html#af74134022427bead53c88a7396fe09bb">sha256Reset</a></div><div class="ttdeci">int sha256Reset(sha256Param *sp)</div><div class="ttdoc">This function resets the parameter block so that it&amp;#39;s ready for a new hash. </div></div>
<div class="ttc" id="sha256_8h_html_ac0c9981d67a9dcda8e091bafa70cc944"><div class="ttname"><a href="sha256_8h.html#ac0c9981d67a9dcda8e091bafa70cc944">sha256Digest</a></div><div class="ttdeci">int sha256Digest(sha256Param *sp, byte *digest)</div><div class="ttdoc">This function finishes the current hash computation and copies the digest value into digest...</div></div>
<div class="ttc" id="sha256_8h_html_ad319a7f3170b74c82543b0f9445716d1"><div class="ttname"><a href="sha256_8h.html#ad319a7f3170b74c82543b0f9445716d1">sha256Update</a></div><div class="ttdeci">int sha256Update(sha256Param *sp, const byte *data, size_t size)</div><div class="ttdoc">This function should be used to pass successive blocks of data to be hashed. </div></div>
<div class="ttc" id="beecrypt_8h_html"><div class="ttname"><a href="beecrypt_8h.html">beecrypt.h</a></div><div class="ttdoc">BeeCrypt API, headers. </div></div>
<div class="ttc" id="api_8h_html_ab8ef12fab634c171394422d0ee8baf94"><div class="ttname"><a href="api_8h.html#ab8ef12fab634c171394422d0ee8baf94">byte</a></div><div class="ttdeci">uint8_t byte</div><div class="ttdef"><b>Definition:</b> api.h:72</div></div>
<div class="ttc" id="api_8h_html_a8de7ba63f011c81fa7f87724104d774b"><div class="ttname"><a href="api_8h.html#a8de7ba63f011c81fa7f87724104d774b">mpw</a></div><div class="ttdeci">uint64_t mpw</div><div class="ttdef"><b>Definition:</b> api.h:87</div></div>
<div class="ttc" id="api_8h_html_a4f699d64328623c51b22f3b3f1ff4150"><div class="ttname"><a href="api_8h.html#a4f699d64328623c51b22f3b3f1ff4150">BEECRYPTAPI</a></div><div class="ttdeci">#define BEECRYPTAPI</div><div class="ttdef"><b>Definition:</b> api.h:52</div></div>
<div class="ttc" id="structsha256Param_html"><div class="ttname"><a href="structsha256Param.html">sha256Param</a></div><div class="ttdoc">Holds all the parameters necessary for the SHA-256 algorithm. </div><div class="ttdef"><b>Definition:</b> sha256.h:35</div></div>
<div class="ttc" id="sha256_8h_html_a0e0db13a02e016e19a677057e472960f"><div class="ttname"><a href="sha256_8h.html#a0e0db13a02e016e19a677057e472960f">sha256Process</a></div><div class="ttdeci">void sha256Process(sha256Param *sp)</div><div class="ttdoc">This function performs the core of the SHA-256 hash algorithm; it processes a block of 64 bytes...</div></div>
<div class="ttc" id="structsha256Param_html_afc003250fd4dc2ece3927ab12bb25752"><div class="ttname"><a href="structsha256Param.html#afc003250fd4dc2ece3927ab12bb25752">sha256Param::offset</a></div><div class="ttdeci">uint32_t offset</div><div class="ttdoc">Offset into data; points to the place where new data will be copied before it is processed. </div><div class="ttdef"><b>Definition:</b> sha256.h:61</div></div>
<div class="ttc" id="structhashFunction_html"><div class="ttname"><a href="structhashFunction.html">hashFunction</a></div><div class="ttdef"><b>Definition:</b> beecrypt.h:301</div></div>
<div class="ttc" id="sha256_8h_html_a679979280ae9498651049fe553f9afae"><div class="ttname"><a href="sha256_8h.html#a679979280ae9498651049fe553f9afae">sha256</a></div><div class="ttdeci">const hashFunction sha256</div><div class="ttdoc">Holds the full API description of the SHA-256 algorithm. </div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Sep 27 2013 02:36:25 for BeeCrypt by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>