Constants
const BlockSize = 64
const Size = 20
func Sum(data []byte) [Size]byte 返回数据data的SHA1校验和
data := []byte("This page intentionally left blank.")
fmt.Printf("%x", sha1.Sum(data))
af064923bbf2301596aac4c273ba32178ebc4a96
func New() hash.Hash 返回一个新的使用SHA1校验的hash.Hash接口
h := sha1.New()
io.WriteString(h, "His money is twice tainted:")
io.WriteString(h, " 'taint yours and 'taint mine.")
fmt.Printf("% x", h.Sum(nil))
59 7f 6a 54 00 10 f9 4c 15 d7 18 06 a9 9a 2c 87 10 e7 47 bd