crypt

package
v0.0.0-...-3442dc8 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2023 License: GPL-2.0 Imports: 5 Imported by: 0

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

Directories

Path Synopsis
script command

Jump to

Keyboard shortcuts

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