-
Notifications
You must be signed in to change notification settings - Fork 0
/
doc.go
32 lines (22 loc) · 817 Bytes
/
doc.go
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
/*
Command sha3 prints the binary SHA-3 digest of its input.
It computes the fixed-output-length hash functions defined by FIPS-202,
and produces exactly length/8 bytes of output.
Usage:
sha3 [-n length]
Flag -n specifies which size output to compute.
Length can be 224, 256, 384, or 512.
The default is 256.
Note that the shorter lengths are not just a truncated
form of the longer ones. FIPS 202 specifies different
construction parameters for each output size,
so they compute different hash functions.
Examples
Show the hex-encoded SHA3-256 digest of the string "hello":
printf hello | sha3 | hex
Obtain the 64-byte SHA3-512 digest of the string "hello" in Go:
cmd := exec.Command("sha3", "-n", "512")
cmd.Stdin = strings.NewReader("hello")
hash, err := cmd.Output()
*/
package main