Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Info ¶
type Info interface {
// Human-readable type for key listing
GetType() KeyType
// Name of the key
GetName() string
// Public key
GetPubKey() crypto.PubKey
}
Info is the publicly exposed information about a keypair
type KeyDAO ¶
type KeyDAO interface {
// Write will use user password to encrypt data and save to file, the file name is user name
Write(name, password string, store KeyInfo) error
// Read will read encrypted data from file and decrypt with user password
Read(name, password string) (KeyInfo, error)
// Delete will delete user data and use user password to verify permissions
Delete(name, password string) error
// Has returns whether the specified user name exists
Has(name string) bool
}
type KeyInfo ¶
type KeyInfo struct {
Name string `json:"name"`
PubKey []byte `json:"pubkey"`
PrivKeyArmor string `json:"priv_key_armor"`
Algo string `json:"algo"`
}
KeyInfo saves the basic information of the key
type LevelDBDAO ¶
type LevelDBDAO struct {
Crypto
// contains filtered or unexported fields
}
func (LevelDBDAO) Delete ¶
func (k LevelDBDAO) Delete(name, password string) error
Delete a key message
func (LevelDBDAO) Has ¶
func (k LevelDBDAO) Has(name string) bool
Query whether key information exists locally
Click to show internal directories.
Click to hide internal directories.