Logo
Explore Help
Sign In
fluencelabs/tendermint
1
0
Fork 0
You've already forked tendermint
mirror of https://github.com/fluencelabs/tendermint synced 2025-05-19 01:51:19 +00:00
Code Issues Projects Releases Wiki Activity
tendermint/crypto/hash.go

20 lines
298 B
Go
Raw Normal View History

mv go-crypto files to crypto dir
2018-06-20 15:30:44 -07:00
package crypto
import (
"crypto/sha256"
crypto: Refactor to move files out of the top level directory Currently the top level directory contains basically all of the code for the crypto package. This PR moves the crypto code into submodules in a similar manner to what `golang/x/crypto` does. This improves code organization. Ref discussion: https://github.com/tendermint/tendermint/pull/1966 Closes #1956
2018-07-18 08:38:44 -07:00
crypto: revert to mainline Go crypto lib (#3027) * crypto: revert to mainline Go crypto lib We used to use a fork for a modified bcrypt so we could pass our own randomness but this was largely unecessary, unused, and a burden. So now we just use the mainline Go crypto lib. * changelog * fix tests * version and changelog
2018-12-16 14:19:38 -05:00
"golang.org/x/crypto/ripemd160"
mv go-crypto files to crypto dir
2018-06-20 15:30:44 -07:00
)
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)
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 43ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API