mocks

package
v0.0.0-...-e1aa8c7 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Decryptor

type Decryptor struct {
}

func (*Decryptor) Decrypt

func (*Decryptor) Decrypt(k csp.Key, ciphertext []byte, opts csp.DecrypterOpts) (plaintext []byte, err error)

type Encryptor

type Encryptor struct {
	KeyArg       csp.Key
	PlaintextArg []byte
	OptsArg      csp.EncrypterOpts

	EncValue []byte
	EncErr   error
}

func (*Encryptor) Encrypt

func (e *Encryptor) Encrypt(k csp.Key, plaintext []byte, opts csp.EncrypterOpts) (ciphertext []byte, err error)

type Hasher

type Hasher struct {
	MsgArg  []byte
	OptsArg csp.HashOpts

	Value     []byte
	ValueHash hash.Hash
	Err       error
}

func (*Hasher) GetHash

func (h *Hasher) GetHash(opts csp.HashOpts) (hash.Hash, error)

func (*Hasher) Hash

func (h *Hasher) Hash(msg []byte, opts csp.HashOpts) (hash []byte, err error)

type KeyDeriver

type KeyDeriver struct {
	KeyArg  csp.Key
	OptsArg csp.KeyDerivOpts

	Value csp.Key
	Err   error
}

func (*KeyDeriver) KeyDeriv

func (kd *KeyDeriver) KeyDeriv(k csp.Key, opts csp.KeyDerivOpts) (dk csp.Key, err error)

type KeyGenerator

type KeyGenerator struct {
	OptsArg csp.KeyGenOpts

	Value csp.Key
	Err   error
}

func (*KeyGenerator) KeyGen

func (kg *KeyGenerator) KeyGen(opts csp.KeyGenOpts) (k csp.Key, err error)

type KeyImporter

type KeyImporter struct {
	RawArg  []byte
	OptsArg csp.KeyImportOpts

	Value csp.Key
	Err   error
}

func (*KeyImporter) KeyImport

func (ki *KeyImporter) KeyImport(raw interface{}, opts csp.KeyImportOpts) (k csp.Key, err error)

type Signer

type Signer struct {
	KeyArg    csp.Key
	DigestArg []byte
	OptsArg   csp.SignerOpts

	Value []byte
	Err   error
}

func (*Signer) Sign

func (s *Signer) Sign(k csp.Key, digest []byte, opts csp.SignerOpts) (signature []byte, err error)

type Verifier

type Verifier struct {
	KeyArg       csp.Key
	SignatureArg []byte
	DigestArg    []byte
	OptsArg      csp.SignerOpts

	Value bool
	Err   error
}

func (*Verifier) Verify

func (s *Verifier) Verify(k csp.Key, signature, digest []byte, opts csp.SignerOpts) (valid bool, err error)

Jump to

Keyboard shortcuts

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