soft

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database interface {
	ListKeys() ([]string, error)
	FindKey(id string) (map[string]interface{}, bool, error)
	Save(id string, data map[string]interface{}) error
	Remove(id string) error

	Close() error
}

type Key

type Key struct {
	// contains filtered or unexported fields
}

func (*Key) Attributes

func (k *Key) Attributes() cryptokit.KeyAttributes

func (*Key) Close

func (k *Key) Close() error

func (*Key) Destroy

func (k *Key) Destroy() error

func (*Key) Extract

func (k *Key) Extract() ([]byte, error)

func (*Key) ID

func (k *Key) ID() string

func (*Key) Length

func (k *Key) Length() uint

func (*Key) Session

func (k *Key) Session() cryptokit.Session

func (*Key) Type

func (k *Key) Type() cryptokit.KeyType

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

func New

func New(path string, key []byte) (*Provider, error)

func NewWithBolt

func NewWithBolt(path string, key []byte) (*Provider, error)

func NewWithDatabase

func NewWithDatabase(db Database) (*Provider, error)

func NewWithVault

func NewWithVault(address, token, base string) (*Provider, error)

func (*Provider) Close

func (p *Provider) Close() error

func (*Provider) OpenSession

func (p *Provider) OpenSession() (cryptokit.Session, error)

type Session

type Session struct {
	// contains filtered or unexported fields
}

func (*Session) Close

func (s *Session) Close() error

func (*Session) Decrypt

func (s *Session) Decrypt(mech cryptokit.Mechanism, key cryptokit.Key, in []byte) ([]byte, error)

func (*Session) Derive

func (s *Session) Derive(mech cryptokit.Mechanism, key cryptokit.Key, attributes cryptokit.KeyAttributes) (cryptokit.Key, error)

func (*Session) Encrypt

func (s *Session) Encrypt(mech cryptokit.Mechanism, key cryptokit.Key, in []byte) ([]byte, error)

func (*Session) FindKey

func (s *Session) FindKey(id string) (cryptokit.Key, bool, error)

func (*Session) Generate

func (s *Session) Generate(mech cryptokit.Mechanism, attributes cryptokit.KeyAttributes) (cryptokit.Key, error)

func (*Session) Hash

func (s *Session) Hash(mech cryptokit.Mechanism, in []byte) ([]byte, error)

func (*Session) ListKeys

func (s *Session) ListKeys() ([]string, error)

func (*Session) Translate

func (s *Session) Translate(mech cryptokit.Mechanism, inKey cryptokit.Key, in []byte, outKey cryptokit.Key) ([]byte, error)

func (*Session) Unwrap

func (s *Session) Unwrap(mech cryptokit.Mechanism, kek cryptokit.Key, key []byte, attributes cryptokit.KeyAttributes) (cryptokit.Key, error)

func (*Session) Wrap

func (s *Session) Wrap(mech cryptokit.Mechanism, kek, key cryptokit.Key) ([]byte, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL