"golang.org/x/crypto/sha3"
)
-func DoubleSha256(b []byte) []byte {
- hasher := sha3.New256()
- hasher.Write(b)
- sum := hasher.Sum(nil)
- hasher.Reset()
- hasher.Write(sum)
- return hasher.Sum(nil)
-}
-
func Sha256(data ...[]byte) []byte {
d := sha3.New256()
for _, b := range data {
return h
}
-func Sha3(data ...[]byte) []byte { return Sha256(data...) }
-func Sha3Hash(data ...[]byte) common.Hash { return Sha256Hash(data...) }
-
func Ripemd160(data []byte) []byte {
ripemd := ripemd160.New()
ripemd.Write(data)