Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package main
- import (
- "crypto/sha256"
- "encoding/hex"
- "fmt"
- )
- func main() {
- right := "3187c721dc9913aef26a6cf1677a29a0c1c24229730911e68091eadf8839873"
- data := make([]byte, 64)
- right_bytes, _ := hex.DecodeString(right)
- copy(data[32:], right_bytes)
- hashed_with_empty_bytes := sha256.Sum256(data)
- fmt.Printf("with empty bytes: %s\n", hex.EncodeToString(hashed_with_empty_bytes[:]))
- hashed_without_empty_bytes := sha256.Sum256(right_bytes)
- fmt.Printf("without empty bytes: %s\n", hex.EncodeToString(hashed_without_empty_bytes[:]))
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement