Browse Source

crypto: delete unused code (#3426)

pull/3452/head
needkane 5 years ago
committed by Ethan Buchman
parent
commit
60b2ae5f5a
3 changed files with 0 additions and 18 deletions
  1. +0
    -3
      crypto/doc.go
  2. +0
    -7
      crypto/example_test.go
  3. +0
    -8
      crypto/hash.go

+ 0
- 3
crypto/doc.go View File

@ -37,9 +37,6 @@
// sum := crypto.Sha256([]byte("This is Tendermint"))
// fmt.Printf("%x\n", sum)
// Ripemd160
// sum := crypto.Ripemd160([]byte("This is consensus"))
// fmt.Printf("%x\n", sum)
package crypto
// TODO: Add more docs in here

+ 0
- 7
crypto/example_test.go View File

@ -26,10 +26,3 @@ func ExampleSha256() {
// Output:
// f91afb642f3d1c87c17eb01aae5cb65c242dfdbe7cf1066cc260f4ce5d33b94e
}
func ExampleRipemd160() {
sum := crypto.Ripemd160([]byte("This is Tendermint"))
fmt.Printf("%x\n", sum)
// Output:
// 051e22663e8f0fd2f2302f1210f954adff009005
}

+ 0
- 8
crypto/hash.go View File

@ -2,8 +2,6 @@ package crypto
import (
"crypto/sha256"
"golang.org/x/crypto/ripemd160"
)
func Sha256(bytes []byte) []byte {
@ -11,9 +9,3 @@ func Sha256(bytes []byte) []byte {
hasher.Write(bytes)
return hasher.Sum(nil)
}
func Ripemd160(bytes []byte) []byte {
hasher := ripemd160.New()
hasher.Write(bytes)
return hasher.Sum(nil)
}

Loading…
Cancel
Save