Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CryptService ¶
type CryptService interface {
CryptType() tpcrtypes.CryptType
GeneratePriPubKey() (tpcrtypes.PrivateKey, tpcrtypes.PublicKey, error)
GeneratePriPubKeyWithSeed(seed []byte) (tpcrtypes.PrivateKey, tpcrtypes.PublicKey, error)
ConvertToPublic(priKey tpcrtypes.PrivateKey) (tpcrtypes.PublicKey, error)
Sign(priKey tpcrtypes.PrivateKey, msg []byte) (tpcrtypes.Signature, error)
Verify(addr tpcrtypes.Address, msg []byte, signData tpcrtypes.Signature) (bool, error)
CreateAddress(pubKey tpcrtypes.PublicKey) (tpcrtypes.Address, error)
}
func CreateCryptService ¶
func CreateCryptService(log tplog.Logger, cryptType tpcrtypes.CryptType) CryptService
Click to show internal directories.
Click to hide internal directories.