Package mocks
import "github.com/hyperledger/fabric/bccsp/sw/mocks"
- Overview
- Index
- type Decryptor
- func (*Decryptor) Decrypt(k bccsp.Key, ciphertext []byte, opts bccsp.DecrypterOpts) (plaintext []byte, err error)
- type Encryptor
- func (e *Encryptor) Encrypt(k bccsp.Key, plaintext []byte, opts bccsp.EncrypterOpts) (ciphertext []byte, err error)
- type Hasher
- func (h *Hasher) GetHash(opts bccsp.HashOpts) (hash.Hash, error)
- func (h *Hasher) Hash(msg []byte, opts bccsp.HashOpts) (hash []byte, err error)
- type KeyDeriver
- func (kd *KeyDeriver) KeyDeriv(k bccsp.Key, opts bccsp.KeyDerivOpts) (dk bccsp.Key, err error)
- type KeyGenerator
- func (kg *KeyGenerator) KeyGen(opts bccsp.KeyGenOpts) (k bccsp.Key, err error)
- type KeyImporter
- func (ki *KeyImporter) KeyImport(raw interface{}, opts bccsp.KeyImportOpts) (k bccsp.Key, err error)
- type Signer
- func (s *Signer) Sign(k bccsp.Key, digest []byte, opts bccsp.SignerOpts) (signature []byte, err error)
- type Verifier
- func (s *Verifier) Verify(k bccsp.Key, signature, digest []byte, opts bccsp.SignerOpts) (valid bool, err error)
Package files
mocks.go
type Decryptor struct {
}
func (*Decryptor) Decrypt
¶
func (*Decryptor) Decrypt(k bccsp.Key, ciphertext []byte, opts bccsp.DecrypterOpts) (plaintext []byte, err error)
type Encryptor struct {
KeyArg bccsp.Key
PlaintextArg []byte
OptsArg bccsp.EncrypterOpts
EncValue []byte
EncErr error
}
func (*Encryptor) Encrypt
¶
func (e *Encryptor) Encrypt(k bccsp.Key, plaintext []byte, opts bccsp.EncrypterOpts) (ciphertext []byte, err error)
type Hasher struct {
MsgArg []byte
OptsArg bccsp.HashOpts
Value []byte
ValueHash hash.Hash
Err error
}
func (h *Hasher) GetHash(opts bccsp.HashOpts) (hash.Hash, error)
func (*Hasher) Hash
¶
func (h *Hasher) Hash(msg []byte, opts bccsp.HashOpts) (hash []byte, err error)
type KeyDeriver struct {
KeyArg bccsp.Key
OptsArg bccsp.KeyDerivOpts
Value bccsp.Key
Err error
}
func (*KeyDeriver) KeyDeriv
¶
func (kd *KeyDeriver) KeyDeriv(k bccsp.Key, opts bccsp.KeyDerivOpts) (dk bccsp.Key, err error)
type KeyGenerator struct {
OptsArg bccsp.KeyGenOpts
Value bccsp.Key
Err error
}
func (*KeyGenerator) KeyGen
¶
func (kg *KeyGenerator) KeyGen(opts bccsp.KeyGenOpts) (k bccsp.Key, err error)
type KeyImporter struct {
RawArg []byte
OptsArg bccsp.KeyImportOpts
Value bccsp.Key
Err error
}
func (*KeyImporter) KeyImport
¶
func (ki *KeyImporter) KeyImport(raw interface{}, opts bccsp.KeyImportOpts) (k bccsp.Key, err error)
type Signer struct {
KeyArg bccsp.Key
DigestArg []byte
OptsArg bccsp.SignerOpts
Value []byte
Err error
}
func (*Signer) Sign
¶
func (s *Signer) Sign(k bccsp.Key, digest []byte, opts bccsp.SignerOpts) (signature []byte, err error)
type Verifier struct {
KeyArg bccsp.Key
SignatureArg []byte
DigestArg []byte
OptsArg bccsp.SignerOpts
Value bool
Err error
}
func (*Verifier) Verify
¶
func (s *Verifier) Verify(k bccsp.Key, signature, digest []byte, opts bccsp.SignerOpts) (valid bool, err error)