wrapper

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

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