Skip to content

Instantly share code, notes, and snippets.

@nullstyle
Created February 9, 2017 00:30
Show Gist options
  • Save nullstyle/e76341107a4ce79b8f3d73b8e2499b78 to your computer and use it in GitHub Desktop.
Save nullstyle/e76341107a4ce79b8f3d73b8e2499b78 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"encoding/base64"
"encoding/hex"
"github.com/stellar/go/hash"
)
func main() {
s := "AAAAAxhNgnledX/cS0FZuGKu/ETSLz+SRuOkdBbDP8LqIFhL6v4au0Jh1Yhw4z0BR+XEDSp1KmD6PUpgtzIrGf6DzWMuxUvnv/7EfABXJz8QCJpJsOPrvgusBavgAABZ0EqSLgAAAAiQAAAAAAAAmiAAAAZAX14QAAAAAyP6cBu2nFMrpuXvq4TJPg8P7YErX9v037JWjmjPx6T/R7/FPRu7+UbfwWtUzVr0hLrAGNGgyI+GYESNi2xgEPGE/LH3Lmfe92rrZxN8QA9GPGXz7GPmsiEddOD+R8H8rWOjPNVhLgCgROLqDxvzuFPbQIQ0w8kfzM6GrUC2st06kAAAAA"
raw, _ := base64.StdEncoding.DecodeString(s)
h := hash.Hash(raw)
out := hex.EncodeToString(h[:])
fmt.Println("calced: ", out)
fmt.Println("target: ", "dce3e9bd1718ec042cdc44338aaab34de5a312bb3a126d2e27861e32a76def37")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment