Documentation ¶
Index ¶
- func GenerateSigningKeyPair() (publicKey ed25519.PublicKey, privateKey ed25519.PrivateKey, err error)
- func GetPrivateSigningKey(fileName string) (privateKey ed25519.PrivateKey, err error)
- func GetPublicSigningKey(fileName string) (publicKey ed25519.PublicKey, err error)
- func GetSigningKeyPair(pub, priv string) (publicKey ed25519.PublicKey, privateKey ed25519.PrivateKey, err error)
- func PublicKeyToP2PKey(publicKey [32]byte) (p2pID peer.ID, err error)
- func VerifySignature(publicKey, message, sign []byte) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateSigningKeyPair ¶
func GenerateSigningKeyPair() (publicKey ed25519.PublicKey, privateKey ed25519.PrivateKey, err error)
GenerateSigningKeyPair generates ed25519 key pair
func GetPrivateSigningKey ¶
func GetPrivateSigningKey(fileName string) (privateKey ed25519.PrivateKey, err error)
GetPrivateSigningKey returns the private key from the file
func GetPublicSigningKey ¶
GetPublicSigningKey returns the public key from the file
func GetSigningKeyPair ¶
func GetSigningKeyPair(pub, priv string) (publicKey ed25519.PublicKey, privateKey ed25519.PrivateKey, err error)
GetSigningKeyPair returns the public and private key pair
func PublicKeyToP2PKey ¶
PublicKeyToP2PKey returns p2pId from the public key
func VerifySignature ¶
VerifySignature validates signature with payload message
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.