Documentation ¶
Index ¶
- type Key
- type KeyAuthorizer
- type KeyLockUnlockLister
- type ScryptParams
- type Store
- func (ks *Store) Authorized(jwtToken string) (bool, UnlockedKey, error)
- func (ks *Store) CreateKey(passphrase string) (string, error)
- func (ks *Store) ListKeys() ([]string, error)
- func (ks *Store) LockKey(address string, jwt string) (bool, error)
- func (ks *Store) SaveKey(key *Key, passphrase string) (string, error)
- func (ks *Store) UnlockKey(address string, passphrase string) (string, error)
- type UnlockedKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Key ¶
Key represents a keypair to be stored.
func NewKeyFromKeyPair ¶
NewKeyFromKeyPair returns a key from a keypair.
func UnmarshalKey ¶
UnmarshalKey decrypts the private key
type KeyAuthorizer ¶
type KeyAuthorizer interface {
Authorized(jwtToken string) (bool, UnlockedKey, error)
}
KeyAuthorizer is an interface with auth mechanism of a key.
type KeyLockUnlockLister ¶ added in v1.1.6
type KeyLockUnlockLister interface { LockKey(address string, jwt string) (bool, error) UnlockKey(address string, passphrase string) (string, error) ListKeys() ([]string, error) KeyAuthorizer }
KeyLockUnlockLister is an interface with locking, unlocking and listing key functionality.
type ScryptParams ¶
type ScryptParams struct { N int `json:"n"` R int `json:"r"` P int `json:"p"` DKeyLength int `json:"dklen"` Salt string `json:"salt"` }
ScryptParams
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store handles keypair storage.
func (*Store) Authorized ¶
func (ks *Store) Authorized(jwtToken string) (bool, UnlockedKey, error)
Authorized checks if a token is authorized and valid.
type UnlockedKey ¶
UnlockedKey represents an unlocked key with a jwt token.
Click to show internal directories.
Click to hide internal directories.