Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorNotFound = errors.New("not found")
Functions ¶
This section is empty.
Types ¶
type KeyType ¶
type KeyType string
const Ed25519VerificationKey2018Type KeyType = "Ed25519VerificationKey2018"
type Storage ¶
type Storage interface {
// contains filtered or unexported methods
}
func NewCouchDbStorage ¶
func NewInMemoryStorage ¶
func NewInMemoryStorage() Storage
type Wallet ¶
type Wallet interface { Create(id string, item interface{}) error Read(id string, out interface{}) error Update(id string, item interface{}) error Delete(id string) error CreateKey(typ KeyType) (string, error) DeleteKey(id string) error KeyExists(id string) bool Encrypt(id string, data []byte) (ciphertext []byte, err error) Decrypt(id string, ciphertext []byte) (data []byte, err error) Sign(id string, data []byte) ([]byte, error) Verify(id string, data []byte, sig []byte) bool Seal(message []byte, receiverKey, senderKey string) (encrypted []byte, nonce [24]byte, err error) SealAnonymous(message []byte, receiverKey string) (encrypted []byte, err error) Open(ciphertext []byte, nonce []byte, senderKey, receiverKey string) (plaintext []byte, res bool) OpenAnonymous(ciphertext []byte, receiverKey string) (plaintext []byte, res bool) }
Click to show internal directories.
Click to hide internal directories.