Skip to content

Commit

Permalink
crypto: delete unused code (#3426)
Browse files Browse the repository at this point in the history
  • Loading branch information
needkane authored and ebuchman committed Mar 20, 2019
1 parent a6349f5 commit 60b2ae5
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 18 deletions.
3 changes: 0 additions & 3 deletions crypto/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 0 additions & 7 deletions crypto/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,3 @@ func ExampleSha256() {
// Output:
// f91afb642f3d1c87c17eb01aae5cb65c242dfdbe7cf1066cc260f4ce5d33b94e
}

func ExampleRipemd160() {
sum := crypto.Ripemd160([]byte("This is Tendermint"))
fmt.Printf("%x\n", sum)
// Output:
// 051e22663e8f0fd2f2302f1210f954adff009005
}
8 changes: 0 additions & 8 deletions crypto/hash.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,10 @@ package crypto

import (
"crypto/sha256"

"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)
}

0 comments on commit 60b2ae5

Please sign in to comment.