wrapper

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2023 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetKey

func GetKey(newkey bccsp.Key) core.Key

GetKey returns implementation of of cryptosuite.Key

func NewCryptoSuite

func NewCryptoSuite(bccsp bccsp.BCCSP) core.CryptoSuite

NewCryptoSuite returns cryptosuite adaptor for given bccsp.BCCSP implementation

Types

type CryptoSuite

type CryptoSuite struct {
	BCCSP bccsp.BCCSP
}

CryptoSuite provides a wrapper of BCCSP

func (*CryptoSuite) GetHash

func (c *CryptoSuite) GetHash(opts core.HashOpts) (h hash.Hash, err error)

GetHash is a wrapper of BCCSP.GetHash

func (*CryptoSuite) GetKey

func (c *CryptoSuite) GetKey(ski []byte) (k core.Key, err error)

GetKey is a wrapper of BCCSP.GetKey

func (*CryptoSuite) Hash

func (c *CryptoSuite) Hash(msg []byte, opts core.HashOpts) (hash []byte, err error)

Hash is a wrapper of BCCSP.Hash

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL