Documentation ¶
Index ¶
- func ParseCert(crtPEM []byte) (*bcx509.Certificate, error)
- func ParsePublicKey(keyType crypto.KeyType, data []byte) (pubKey crypto.PublicKey, err error)
- func SignTx(privatekey crypto.PrivateKey, opts *crypto.SignOpts, msg interface{}) ([]byte, error)
- func VerifyTX(sig []byte, msg interface{}, pk crypto.PublicKey, opts *crypto.SignOpts) (bool, error)
- type KeyPair
- type PubKeyEntity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParsePublicKey ¶
ParsePublicKey 从字节数组中解析出公钥
func SignTx ¶
SignTx sign msg @Param msg messages that need to be signed @Param privatekey this variable is the private key used by the node @Param crypto.SignOpts this variable contains the conditions to be set for node signature @Return sig digital signature
func VerifyTX ¶
func VerifyTX(sig []byte, msg interface{}, pk crypto.PublicKey, opts *crypto.SignOpts) (bool, error)
VerifyTX verify msg sign @Param msg messages that need to be signed @Param sig digital signature @Param pk this variable is the public key used by the node @Param opts this variable contains the conditions to be set for node signature @Return sig digital signature
Types ¶
Click to show internal directories.
Click to hide internal directories.