diff --git a/keys.go b/keys.go index b0e8c97..a070246 100644 --- a/keys.go +++ b/keys.go @@ -3,6 +3,7 @@ package nostr import ( "crypto/rand" "encoding/hex" + "fmt" "io" "math/big" "strings" @@ -25,7 +26,7 @@ func GeneratePrivateKey() string { k.Mod(k, n) k.Add(k, one) - return hex.EncodeToString(k.Bytes()) + return fmt.Sprintf("%064x", k.Bytes()) } func GetPublicKey(sk string) (string, error) {