1
0
mirror of https://github.com/fluencelabs/tendermint synced 2025-06-27 11:41:39 +00:00
Files
.circleci
.github
DOCKER
abci
benchmarks
blockchain
cmd
config
consensus
crypto
armor
ed25519
encoding
internal
merkle
multisig
secp256k1
tmhash
xchacha20poly1305
xsalsa20symmetric
CHANGELOG.md
README.md
crypto.go
doc.go
example_test.go
hash.go
random.go
version.go
docs
evidence
libs
lite
mempool
networks
node
p2p
privval
proxy
rpc
scripts
state
test
tools
types
version
.editorconfig
.gitignore
CHANGELOG.md
CHANGELOG_PENDING.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
Gopkg.lock
Gopkg.toml
LICENSE
Makefile
README.md
ROADMAP.md
SECURITY.md
UPGRADING.md
Vagrantfile
appveyor.yml
codecov.yml
docker-compose.yml
tendermint/crypto/hash.go

20 lines
298 B
Go
Raw 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)
}