mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-25 06:42:16 +00:00
crypto: delete unused code (#3426)
This commit is contained in:
parent
a6349f5063
commit
60b2ae5f5a
@ -37,9 +37,6 @@
|
|||||||
// sum := crypto.Sha256([]byte("This is Tendermint"))
|
// sum := crypto.Sha256([]byte("This is Tendermint"))
|
||||||
// fmt.Printf("%x\n", sum)
|
// fmt.Printf("%x\n", sum)
|
||||||
|
|
||||||
// Ripemd160
|
|
||||||
// sum := crypto.Ripemd160([]byte("This is consensus"))
|
|
||||||
// fmt.Printf("%x\n", sum)
|
|
||||||
package crypto
|
package crypto
|
||||||
|
|
||||||
// TODO: Add more docs in here
|
// TODO: Add more docs in here
|
||||||
|
@ -26,10 +26,3 @@ func ExampleSha256() {
|
|||||||
// Output:
|
// Output:
|
||||||
// f91afb642f3d1c87c17eb01aae5cb65c242dfdbe7cf1066cc260f4ce5d33b94e
|
// f91afb642f3d1c87c17eb01aae5cb65c242dfdbe7cf1066cc260f4ce5d33b94e
|
||||||
}
|
}
|
||||||
|
|
||||||
func ExampleRipemd160() {
|
|
||||||
sum := crypto.Ripemd160([]byte("This is Tendermint"))
|
|
||||||
fmt.Printf("%x\n", sum)
|
|
||||||
// Output:
|
|
||||||
// 051e22663e8f0fd2f2302f1210f954adff009005
|
|
||||||
}
|
|
||||||
|
@ -2,8 +2,6 @@ package crypto
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/sha256"
|
"crypto/sha256"
|
||||||
|
|
||||||
"golang.org/x/crypto/ripemd160"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Sha256(bytes []byte) []byte {
|
func Sha256(bytes []byte) []byte {
|
||||||
@ -11,9 +9,3 @@ func Sha256(bytes []byte) []byte {
|
|||||||
hasher.Write(bytes)
|
hasher.Write(bytes)
|
||||||
return hasher.Sum(nil)
|
return hasher.Sum(nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
func Ripemd160(bytes []byte) []byte {
|
|
||||||
hasher := ripemd160.New()
|
|
||||||
hasher.Write(bytes)
|
|
||||||
return hasher.Sum(nil)
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user