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

package mocks

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

Index

Package Files

mocks.go

type DecrypterOpts Uses

type DecrypterOpts struct{}

type EncrypterOpts Uses

type EncrypterOpts struct{}

type HashOpts Uses

type HashOpts struct{}

func (HashOpts) Algorithm Uses

func (HashOpts) Algorithm() string

type KeyDerivOpts Uses

type KeyDerivOpts struct {
    EphemeralValue bool
}

func (*KeyDerivOpts) Algorithm Uses

func (*KeyDerivOpts) Algorithm() string

func (*KeyDerivOpts) Ephemeral Uses

func (o *KeyDerivOpts) Ephemeral() bool

type KeyGenOpts Uses

type KeyGenOpts struct {
    EphemeralValue bool
}

func (*KeyGenOpts) Algorithm Uses

func (*KeyGenOpts) Algorithm() string

func (*KeyGenOpts) Ephemeral Uses

func (o *KeyGenOpts) Ephemeral() bool

type KeyImportOpts Uses

type KeyImportOpts struct{}

func (*KeyImportOpts) Algorithm Uses

func (*KeyImportOpts) Algorithm() string

func (*KeyImportOpts) Ephemeral Uses

func (*KeyImportOpts) Ephemeral() bool

type KeyStore Uses

type KeyStore struct {
    GetKeyValue bccsp.Key
    GetKeyErr   error
    StoreKeyErr error
}

func (*KeyStore) GetKey Uses

func (ks *KeyStore) GetKey(ski []byte) (bccsp.Key, error)

func (*KeyStore) ReadOnly Uses

func (*KeyStore) ReadOnly() bool

func (*KeyStore) StoreKey Uses

func (ks *KeyStore) StoreKey(k bccsp.Key) error

type MockBCCSP Uses

type MockBCCSP struct {
    SignArgKey    bccsp.Key
    SignDigestArg []byte
    SignOptsArg   bccsp.SignerOpts

    SignValue []byte
    SignErr   error

    VerifyValue bool
    VerifyErr   error

    ExpectedSig []byte

    KeyImportValue bccsp.Key
    KeyImportErr   error

    EncryptError error
    DecryptError error

    HashVal []byte
    HashErr error
}

func (*MockBCCSP) Decrypt Uses

func (m *MockBCCSP) Decrypt(k bccsp.Key, ciphertext []byte, opts bccsp.DecrypterOpts) ([]byte, error)

func (*MockBCCSP) Encrypt Uses

func (m *MockBCCSP) Encrypt(k bccsp.Key, plaintext []byte, opts bccsp.EncrypterOpts) ([]byte, error)

func (*MockBCCSP) GetHash Uses

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

func (*MockBCCSP) GetKey Uses

func (*MockBCCSP) GetKey(ski []byte) (bccsp.Key, error)

func (*MockBCCSP) Hash Uses

func (m *MockBCCSP) Hash(msg []byte, opts bccsp.HashOpts) ([]byte, error)

func (*MockBCCSP) KeyDeriv Uses

func (*MockBCCSP) KeyDeriv(k bccsp.Key, opts bccsp.KeyDerivOpts) (bccsp.Key, error)

func (*MockBCCSP) KeyGen Uses

func (*MockBCCSP) KeyGen(opts bccsp.KeyGenOpts) (bccsp.Key, error)

func (*MockBCCSP) KeyImport Uses

func (m *MockBCCSP) KeyImport(raw interface{}, opts bccsp.KeyImportOpts) (bccsp.Key, error)

func (*MockBCCSP) Sign Uses

func (b *MockBCCSP) Sign(k bccsp.Key, digest []byte, opts bccsp.SignerOpts) ([]byte, error)

func (*MockBCCSP) Verify Uses

func (b *MockBCCSP) Verify(k bccsp.Key, signature, digest []byte, opts bccsp.SignerOpts) (bool, error)

type MockKey Uses

type MockKey struct {
    BytesValue []byte
    BytesErr   error
    Symm       bool
    PK         bccsp.Key
    PKErr      error
    Pvt        bool
}

func (*MockKey) Bytes Uses

func (m *MockKey) Bytes() ([]byte, error)

func (*MockKey) Private Uses

func (m *MockKey) Private() bool

func (*MockKey) PublicKey Uses

func (m *MockKey) PublicKey() (bccsp.Key, error)

func (*MockKey) SKI Uses

func (*MockKey) SKI() []byte

func (*MockKey) Symmetric Uses

func (m *MockKey) Symmetric() bool

type SignerOpts Uses

type SignerOpts struct {
    HashFuncValue crypto.Hash
}

func (*SignerOpts) HashFunc Uses

func (o *SignerOpts) HashFunc() crypto.Hash

Package mocks imports 6 packages (graph). Updated 2018-12-12. Refresh now. Tools for package owners.