mirror of
https://github.com/tendermint/tendermint.git
synced 2026-02-07 20:40:44 +00:00
Make Ripemd160 the default
This commit is contained in:
@@ -40,6 +40,7 @@ func BinaryCompare(a, b interface{}) int {
|
||||
return bytes.Compare(aBytes, bBytes)
|
||||
}
|
||||
|
||||
// NOTE: only use this if you need 32 bytes.
|
||||
func BinarySha256(o interface{}) []byte {
|
||||
hasher, n, err := sha256.New(), new(int64), new(error)
|
||||
WriteBinary(o, hasher, n, err)
|
||||
@@ -49,6 +50,7 @@ func BinarySha256(o interface{}) []byte {
|
||||
return hasher.Sum(nil)
|
||||
}
|
||||
|
||||
// NOTE: The default hash function is Ripemd160.
|
||||
func BinaryRipemd160(o interface{}) []byte {
|
||||
hasher, n, err := ripemd160.New(), new(int64), new(error)
|
||||
WriteBinary(o, hasher, n, err)
|
||||
|
||||
Reference in New Issue
Block a user