OSDN Git Service

writer close
[bytom/vapor.git] / crypto / crypto.go
index e21f561..fd434b4 100644 (file)
@@ -6,15 +6,6 @@ import (
        "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 {
@@ -32,9 +23,6 @@ func Sha256Hash(data ...[]byte) (h common.Hash) {
        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)