Documentation ¶
Index ¶
- func GetKey(newkey bccsp.Key) core.Key
- func NewCryptoSuite(bccsp bccsp.BCCSP) core.CryptoSuite
- type CryptoSuite
- func (c *CryptoSuite) GetHash(opts core.HashOpts) (h hash.Hash, err error)
- func (c *CryptoSuite) GetKey(ski []byte) (k core.Key, err error)
- func (c *CryptoSuite) Hash(msg []byte, opts core.HashOpts) (hash []byte, err error)
- func (c *CryptoSuite) KeyGen(opts core.KeyGenOpts) (k core.Key, err error)
- func (c *CryptoSuite) KeyImport(raw interface{}, opts core.KeyImportOpts) (k core.Key, err error)
- func (c *CryptoSuite) Sign(k core.Key, digest []byte, opts core.SignerOpts) (signature []byte, err error)
- func (c *CryptoSuite) Verify(k core.Key, signature, digest []byte, opts core.SignerOpts) (valid bool, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCryptoSuite ¶
func NewCryptoSuite(bccsp bccsp.BCCSP) core.CryptoSuite
NewCryptoSuite returns cryptosuite adaptor for given bccsp.BCCSP implementation
Types ¶
type CryptoSuite ¶
CryptoSuite provides a wrapper of BCCSP
func (*CryptoSuite) GetKey ¶
func (c *CryptoSuite) GetKey(ski []byte) (k core.Key, err error)
GetKey is a wrapper of BCCSP.GetKey
func (*CryptoSuite) KeyGen ¶
func (c *CryptoSuite) KeyGen(opts core.KeyGenOpts) (k core.Key, err error)
KeyGen is a wrapper of BCCSP.KeyGen
func (*CryptoSuite) KeyImport ¶
func (c *CryptoSuite) KeyImport(raw interface{}, opts core.KeyImportOpts) (k core.Key, err error)
KeyImport is a wrapper of BCCSP.KeyImport
func (*CryptoSuite) Sign ¶
func (c *CryptoSuite) Sign(k core.Key, digest []byte, opts core.SignerOpts) (signature []byte, err error)
Sign is a wrapper of BCCSP.Sign
func (*CryptoSuite) Verify ¶
func (c *CryptoSuite) Verify(k core.Key, signature, digest []byte, opts core.SignerOpts) (valid bool, err error)
Verify is a wrapper of BCCSP.Verify
Click to show internal directories.
Click to hide internal directories.