Documentation ¶
Overview ¶
Package keystore defines a local key manager for OrbitDB and IPFS Log.
Index ¶
- type Interface
- type Keystore
- func (k *Keystore) CreateKey(ctx context.Context, id string) (crypto.PrivKey, error)
- func (k *Keystore) GetKey(ctx context.Context, id string) (crypto.PrivKey, error)
- func (k *Keystore) HasKey(ctx context.Context, id string) (bool, error)
- func (k *Keystore) Sign(privKey crypto.PrivKey, bytes []byte) ([]byte, error)
- func (k *Keystore) Verify(signature []byte, publicKey crypto.PubKey, data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface { HasKey(ctx context.Context, id string) (bool, error) CreateKey(ctx context.Context, id string) (crypto.PrivKey, error) GetKey(ctx context.Context, id string) (crypto.PrivKey, error) Sign(pubKey crypto.PrivKey, bytes []byte) ([]byte, error) Verify(signature []byte, publicKey crypto.PubKey, data []byte) error }
type Keystore ¶
type Keystore struct {
// contains filtered or unexported fields
}
func NewKeystore ¶
NewKeystore creates a new keystore.
Click to show internal directories.
Click to hide internal directories.