Skip to content

Instantly share code, notes, and snippets.

@zamicol
Created February 7, 2023 05:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zamicol/262145621ba32fd5039b60b3cc31bd1a to your computer and use it in GitHub Desktop.
Save zamicol/262145621ba32fd5039b60b3cc31bd1a to your computer and use it in GitHub Desktop.
pub, pri, err := ed25519.GenerateKey(nil)
if err != nil {
panic(err)
}
sig := ed25519.Sign(pri, msg)
if err != nil {
panic(err)
}
//fmt.Printf("seed: %s, sign %s\n", B64(pri[0:32]), B64(sig))
valid = ed25519.Verify(pub, msg, sig)
fmt.Println(valid)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment