Documentation ¶
Index ¶
- func ED25519Sign(p ed25519.PrivateKey, data []byte) (string, error)
- func ED25519SignFile(p ed25519.PrivateKey, path string) (string, error)
- func ED25519Verify(signature string, p ed25519.PublicKey, data []byte) (bool, error)
- func ED25519VerifyFile(signature string, p ed25519.PublicKey, file string) (bool, error)
- func GenerateED25519Key(private string, public string)
- func GenerateIdentity() (string, string)
- func GetED25519PrivateKey(privateKey string) (ed25519.PrivateKey, error)
- func GetED25519PublicKey(publicKey string) (ed25519.PublicKey, error)
- func GetIdentity(pubkey string) peer.ID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ED25519Sign ¶
func ED25519Sign(p ed25519.PrivateKey, data []byte) (string, error)
func ED25519SignFile ¶
func ED25519SignFile(p ed25519.PrivateKey, path string) (string, error)
Sign reads the input file and compute the ED25519 signature using the private key.
func ED25519Verify ¶
Verify checks that input signature is valid. That is, if input file was signed by private key corresponding to input public key.
func ED25519VerifyFile ¶
func GenerateED25519Key ¶
func GenerateIdentity ¶
func GetED25519PrivateKey ¶
func GetED25519PrivateKey(privateKey string) (ed25519.PrivateKey, error)
GetPrivateKey reads the private key from input file and returns the initialized PrivateKey.
func GetED25519PublicKey ¶
GetPublicKey reads the public key from input file and returns the initialized PublicKey.
func GetIdentity ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.