mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-25 14:52:17 +00:00
* ed25519: use golang/x/crypto fork * changelog * gix GenerateFromPassword * fixes from review
20 lines
340 B
Go
20 lines
340 B
Go
package crypto
|
|
|
|
import (
|
|
"crypto/sha256"
|
|
|
|
"golang.org/x/crypto/ripemd160" // forked to github.com/tendermint/crypto
|
|
)
|
|
|
|
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)
|
|
}
|