| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
 | <h1> Package sha512  </h1>     <ul id="short-nav">
<li><code>import "crypto/sha512"</code></li>
<li><a href="#pkg-overview" class="overviewLink">Overview</a></li>
<li><a href="#pkg-index" class="indexLink">Index</a></li>
</ul>     <h2 id="pkg-overview">Overview </h2> <p>Package sha512 implements the SHA-384, SHA-512, SHA-512/224, and SHA-512/256 hash algorithms as defined in FIPS 180-4. </p>
<p>All the hash.Hash implementations returned by this package also implement encoding.BinaryMarshaler and encoding.BinaryUnmarshaler to marshal and unmarshal the internal state of the hash. </p>     <h2 id="pkg-index">Index </h2>  <ul id="manual-nav">
<li><a href="#pkg-constants">Constants</a></li>
<li><a href="#New">func New() hash.Hash</a></li>
<li><a href="#New384">func New384() hash.Hash</a></li>
<li><a href="#New512_224">func New512_224() hash.Hash</a></li>
<li><a href="#New512_256">func New512_256() hash.Hash</a></li>
<li><a href="#Sum384">func Sum384(data []byte) [Size384]byte</a></li>
<li><a href="#Sum512">func Sum512(data []byte) [Size]byte</a></li>
<li><a href="#Sum512_224">func Sum512_224(data []byte) [Size224]byte</a></li>
<li><a href="#Sum512_256">func Sum512_256(data []byte) [Size256]byte</a></li>
</ul> <h3>Package files</h3> <p>  <span>sha512.go</span> <span>sha512block.go</span> <span>sha512block_amd64.go</span>  </p>   <h2 id="pkg-constants">Constants</h2> <pre data-language="go">const (
    // Size is the size, in bytes, of a SHA-512 checksum.
    Size = 64
    // Size224 is the size, in bytes, of a SHA-512/224 checksum.
    Size224 = 28
    // Size256 is the size, in bytes, of a SHA-512/256 checksum.
    Size256 = 32
    // Size384 is the size, in bytes, of a SHA-384 checksum.
    Size384 = 48
    // BlockSize is the block size, in bytes, of the SHA-512/224,
    // SHA-512/256, SHA-384 and SHA-512 hash functions.
    BlockSize = 128
)</pre> <h2 id="New">func <span>New</span>  </h2> <pre data-language="go">func New() hash.Hash</pre> <p>New returns a new hash.Hash computing the SHA-512 checksum. </p>
<h2 id="New384">func <span>New384</span>  </h2> <pre data-language="go">func New384() hash.Hash</pre> <p>New384 returns a new hash.Hash computing the SHA-384 checksum. </p>
<h2 id="New512_224">func <span>New512_224</span>  <span title="Added in Go 1.5">1.5</span> </h2> <pre data-language="go">func New512_224() hash.Hash</pre> <p>New512_224 returns a new hash.Hash computing the SHA-512/224 checksum. </p>
<h2 id="New512_256">func <span>New512_256</span>  <span title="Added in Go 1.5">1.5</span> </h2> <pre data-language="go">func New512_256() hash.Hash</pre> <p>New512_256 returns a new hash.Hash computing the SHA-512/256 checksum. </p>
<h2 id="Sum384">func <span>Sum384</span>  <span title="Added in Go 1.2">1.2</span> </h2> <pre data-language="go">func Sum384(data []byte) [Size384]byte</pre> <p>Sum384 returns the SHA384 checksum of the data. </p>
<h2 id="Sum512">func <span>Sum512</span>  <span title="Added in Go 1.2">1.2</span> </h2> <pre data-language="go">func Sum512(data []byte) [Size]byte</pre> <p>Sum512 returns the SHA512 checksum of the data. </p>
<h2 id="Sum512_224">func <span>Sum512_224</span>  <span title="Added in Go 1.5">1.5</span> </h2> <pre data-language="go">func Sum512_224(data []byte) [Size224]byte</pre> <p>Sum512_224 returns the Sum512/224 checksum of the data. </p>
<h2 id="Sum512_256">func <span>Sum512_256</span>  <span title="Added in Go 1.5">1.5</span> </h2> <pre data-language="go">func Sum512_256(data []byte) [Size256]byte</pre> <p>Sum512_256 returns the Sum512/256 checksum of the data. </p><div class="_attribution">
  <p class="_attribution-p">
    © Google, Inc.<br>Licensed under the Creative Commons Attribution License 3.0.<br>
    <a href="http://golang.org/pkg/crypto/sha512/" class="_attribution-link">http://golang.org/pkg/crypto/sha512/</a>
  </p>
</div>
 |