OSDN Git Service
(root)
/
bytom
/
vapor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
delete first tx vote amount restrict (#301)
[bytom/vapor.git]
/
crypto
/
crypto.go
diff --git
a/crypto/crypto.go
b/crypto/crypto.go
index
e21f561
..
fd434b4
100644
(file)
--- a/
crypto/crypto.go
+++ b/
crypto/crypto.go
@@
-6,15
+6,6
@@
import (
"golang.org/x/crypto/sha3"
)
"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 {
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
}
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)
func Ripemd160(data []byte) []byte {
ripemd := ripemd160.New()
ripemd.Write(data)