Documentation ¶
Index ¶
- type BCCSP
- func (*BCCSP) Decrypt(k bccsp.Key, ciphertext []byte, opts bccsp.DecrypterOpts) (plaintext []byte, err error)
- func (*BCCSP) Encrypt(k bccsp.Key, plaintext []byte, opts bccsp.EncrypterOpts) (ciphertext []byte, err error)
- func (*BCCSP) GetHash(opts bccsp.HashOpts) (h hash.Hash, err error)
- func (*BCCSP) GetKey(ski []byte) (k bccsp.Key, err error)
- func (*BCCSP) Hash(msg []byte, opts bccsp.HashOpts) (hash []byte, err error)
- func (*BCCSP) KeyDeriv(k bccsp.Key, opts bccsp.KeyDerivOpts) (dk bccsp.Key, err error)
- func (*BCCSP) KeyGen(opts bccsp.KeyGenOpts) (k bccsp.Key, err error)
- func (m *BCCSP) KeyImport(raw interface{}, opts bccsp.KeyImportOpts) (k bccsp.Key, err error)
- func (*BCCSP) Sign(k bccsp.Key, digest []byte, opts bccsp.SignerOpts) (signature []byte, err error)
- func (*BCCSP) Verify(k bccsp.Key, signature, digest []byte, opts bccsp.SignerOpts) (valid bool, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BCCSP ¶
BCCSP mocks a BCCSP to be used in the util package
func (*BCCSP) Decrypt ¶
func (*BCCSP) Decrypt(k bccsp.Key, ciphertext []byte, opts bccsp.DecrypterOpts) (plaintext []byte, err error)
Decrypt decrypts ciphertext using key k. The opts argument should be appropriate for the algorithm used.
func (*BCCSP) Encrypt ¶
func (*BCCSP) Encrypt(k bccsp.Key, plaintext []byte, opts bccsp.EncrypterOpts) (ciphertext []byte, err error)
Encrypt encrypts plaintext using key k. The opts argument should be appropriate for the algorithm used.
func (*BCCSP) GetHash ¶
GetHash returns and instance of hash.Hash using options opts. If opts is nil, the default hash function will be returned.
func (*BCCSP) GetKey ¶
GetKey returns the key this CSP associates to the Subject Key Identifier ski.
func (*BCCSP) Hash ¶
Hash hashes messages msg using options opts. If opts is nil, the default hash function will be used.
func (*BCCSP) KeyDeriv ¶
KeyDeriv derives a key from k using opts. The opts argument should be appropriate for the primitive used.
func (*BCCSP) KeyImport ¶
KeyImport imports a key from its raw representation using opts. The opts argument should be appropriate for the primitive used.