1
0
mirror of https://github.com/fluencelabs/tendermint synced 2025-06-09 11:31:19 +00:00

19 lines
297 B
Go
Raw Normal View History

2016-03-13 09:40:15 -07:00
package crypto
import (
"crypto/sha256"
"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)
}