Advertisement
Guest User

Untitled

a guest
Apr 27th, 2018
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.40 KB | None | 0 0
  1. package main
  2.  
  3. import (
  4.         "crypto/sha256"
  5.         "encoding/hex"
  6.         "fmt"
  7.  
  8.         "golang.org/x/crypto/ripemd160"
  9. )
  10.  
  11. func main() {
  12.         input := []byte{0x51}
  13.         sum := sha256.Sum256(input)
  14.         hasher := ripemd160.New()
  15.         hasher.Write(sum[:])
  16.         hashBytes := hasher.Sum(nil)
  17.         encodedStr := hex.EncodeToString(hashBytes[:])
  18.         fmt.Println(encodedStr)
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement