1
0
mirror of https://github.com/fluencelabs/tendermint synced 2025-05-06 20:12:15 +00:00

20 lines
298 B
Go
Raw Permalink Normal View History

2018-06-20 15:30:44 -07:00
package crypto
import (
"crypto/sha256"
2018-06-20 15:30:44 -07:00
"golang.org/x/crypto/ripemd160"
)
func Sha256(bytes []byte) []byte {
hasher := sha256.New()
hasher.Write(bytes)
return hasher.Sum(nil)
}
func Ripemd160(bytes []byte) []byte {
hasher := ripemd160.New()
hasher.Write(bytes)
return hasher.Sum(nil)
}