chore: add a helpful ed25519 key generator

This commit is contained in:
0x1a8510f2 2022-11-24 05:23:01 +00:00
parent ac80e17f79
commit ede045e756
Signed by: 0x1a8510f2
GPG Key ID: 1C692E355D76775D

22
cmd/mkkey/main.go Normal file
View File

@ -0,0 +1,22 @@
package main
import (
"crypto/ed25519"
"crypto/rand"
"encoding/hex"
"fmt"
)
func main() {
pubkey, prvkey, err := ed25519.GenerateKey(rand.Reader)
if err != nil {
panic(err)
}
fmt.Printf(
"PUBLIC KEY: %s\nPRIVATE KEY: %s\n",
hex.EncodeToString(pubkey),
hex.EncodeToString(prvkey),
)
}