crypto

package
v0.0.0-...-56f3d1a Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 6 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeProposalMsgDigest

func MakeProposalMsgDigest(msg *pb.ProposalMsg) ([]byte, error)

MakePhaseMsgDigest make ChainedBftPhaseMessage Digest

Types

type CBFTCrypto

type CBFTCrypto struct {
	Address      *cctx.Address
	CryptoClient cctx.CryptoClient
}

func NewCBFTCrypto

func NewCBFTCrypto(addr *cctx.Address, c cctx.CryptoClient) *CBFTCrypto

func (*CBFTCrypto) SignProposalMsg

func (c *CBFTCrypto) SignProposalMsg(msg *pb.ProposalMsg) (*pb.ProposalMsg, error)

func (*CBFTCrypto) SignVoteMsg

func (c *CBFTCrypto) SignVoteMsg(msg []byte) (*pb.QuorumCertSign, error)

SignVoteMsg make ChainedBftVoteMessage sign

func (*CBFTCrypto) VerifyVoteMsgSign

func (c *CBFTCrypto) VerifyVoteMsgSign(sig *pb.QuorumCertSign, msg []byte) (bool, error)

Jump to

Keyboard shortcuts

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