Created
February 7, 2023 05:44
-
-
Save zamicol/262145621ba32fd5039b60b3cc31bd1a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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