Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNoPub is returned when a public key can't be found ErrNoPub = errors.New("Public key not found") )
Functions ¶
This section is empty.
Types ¶
type Memory ¶
type Memory struct {
// contains filtered or unexported fields
}
Memory is a store that stays in memory. Good for testing.
func NewMemoryStore ¶
func NewMemoryStore(priv *ecdsa.PrivateKey) *Memory
NewMemoryStore creates a new in memory Store
func (*Memory) Priv ¶
func (m *Memory) Priv() *ecdsa.PrivateKey
type Store ¶
type Store interface { // Find attempts to find a public key given a signature. Find(sig *block.Signature) (*ecdsa.PublicKey, error) // Add A key to the store Add(key *ecdsa.PublicKey) error // Remove does what it sounds like Remove(key *ecdsa.PublicKey) error // Priv loads a private key Priv() *ecdsa.PrivateKey }
Store provides storage and retreval of keys.
Click to show internal directories.
Click to hide internal directories.