fabric: github.com/hyperledger/fabric/bccsp/sw/mocks Index | Files

package mocks

import "github.com/hyperledger/fabric/bccsp/sw/mocks"

Index

Package Files

mocks.go

type Decryptor Uses

type Decryptor struct {
}

func (*Decryptor) Decrypt Uses

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

type Encryptor Uses

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

    EncValue []byte
    EncErr   error
}

func (*Encryptor) Encrypt Uses

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

type Hasher Uses

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

    Value     []byte
    ValueHash hash.Hash
    Err       error
}

func (*Hasher) GetHash Uses

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

func (*Hasher) Hash Uses

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

type KeyDeriver Uses

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

    Value bccsp.Key
    Err   error
}

func (*KeyDeriver) KeyDeriv Uses

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

type KeyGenerator Uses

type KeyGenerator struct {
    OptsArg bccsp.KeyGenOpts

    Value bccsp.Key
    Err   error
}

func (*KeyGenerator) KeyGen Uses

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

type KeyImporter Uses

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

    Value bccsp.Key
    Err   error
}

func (*KeyImporter) KeyImport Uses

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

type Signer Uses

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

    Value []byte
    Err   error
}

func (*Signer) Sign Uses

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

type Verifier Uses

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

    Value bool
    Err   error
}

func (*Verifier) Verify Uses

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

Package mocks imports 4 packages (graph). Updated 2018-08-06. Refresh now. Tools for package owners.