Documentation ¶
Overview ¶
Package keystore implements an unencrypted file system key store.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ed25519KeyPair ¶
type Ed25519KeyPair struct { AccountID string `json:"account_id"` PublicKey string `json:"public_key"` PrivateKey string `json:"private_key,omitempty"` SecretKey string `json:"secret_key,omitempty"` Ed25519PubKey ed25519.PublicKey `json:"-"` Ed25519PrivKey ed25519.PrivateKey `json:"-"` }
Ed25519KeyPair is an Ed25519 key pair.
func GenerateEd25519KeyPair ¶
func GenerateEd25519KeyPair(accountID string) (*Ed25519KeyPair, error)
GenerateEd25519KeyPair generates a new Ed25519 key pair for accountID.
func KeyPairFromPrivateKey ¶
func KeyPairFromPrivateKey(accountID string, privateKey ed25519.PrivateKey) *Ed25519KeyPair
KeyPairFromPrivateKey creates a key-pair given an accountID and a private key.
func LoadKeyPairFromPath ¶
func LoadKeyPairFromPath(path, accountID string) (*Ed25519KeyPair, error)
LoadKeyPairFromPath reads the Ed25519 key pair for the given ccountID from path returns it.
Click to show internal directories.
Click to hide internal directories.