Documentation ¶
Index ¶
- func B64StringDecodePrivateKey(enc string) (*ecdsa.PrivateKey, error)
- func ByteHash256(raw []byte) common.Hash
- func Checksum(payload []byte) []byte
- func DefaultPubKey2Addr(p ecdsa.PublicKey) common.Address
- func ECDSASign(hash []byte, prv *ecdsa.PrivateKey) ([]byte, error)
- func ECDSASign2Hex(hash []byte, prv *ecdsa.PrivateKey) (string, error)
- func GenPrvKey() (*ecdsa.PrivateKey, error)
- func MustGenPrvKey() *ecdsa.PrivateKey
- func ParsePubKeyFromSignature(sig []byte) (ecdsa.PublicKey, error)
- func PrivateKeyEncodeB64String(key *ecdsa.PrivateKey) (string, error)
- func PubKey2Addr(version uint8, p ecdsa.PublicKey) common.Address
- func PubKeyEncode(p ecdsa.PublicKey) []byte
- func PubKeySha256Hash(p ecdsa.PublicKey) common.Hash
- func PubKeySha256HashBs(p ecdsa.PublicKey) []byte
- func VerifyAddress(addr common.Address) bool
- func VerifySignature(data []byte, sig []byte) bool
- func VerifySignatureByPublic(data []byte, sig []byte, pub *ecdsa.PublicKey) bool
- func VerifySignatureFromHex(data []byte, sigHex string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func B64StringDecodePrivateKey ¶
func B64StringDecodePrivateKey(enc string) (*ecdsa.PrivateKey, error)
func ByteHash256 ¶
func ECDSASign2Hex ¶
func ECDSASign2Hex(hash []byte, prv *ecdsa.PrivateKey) (string, error)
func GenPrvKey ¶
func GenPrvKey() (*ecdsa.PrivateKey, error)
func MustGenPrvKey ¶
func MustGenPrvKey() *ecdsa.PrivateKey
func PrivateKeyEncodeB64String ¶
func PrivateKeyEncodeB64String(key *ecdsa.PrivateKey) (string, error)
func PubKeyEncode ¶
func PubKeySha256HashBs ¶
func VerifyAddress ¶
func VerifySignature ¶
func VerifySignatureByPublic ¶
func VerifySignatureFromHex ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.