Documentation ¶
Index ¶
- func EcRecover(hash, sig []byte) ([]byte, error)
- func Keccak256(data ...[]byte) []byte
- func NewPrivateKey(privateKeyBytes []byte) (*ecdsa.PrivateKey, error)
- func NewPrivateKeyByHex(privateKeyHex string) (*ecdsa.PrivateKey, error)
- func PersonalEcRecover(data []byte, sig []byte) (string, error)
- func PersonalSign(message []byte, privateKey string) ([]byte, error)
- func PersonalSignByPrivateKey(message []byte, privateKey *ecdsa.PrivateKey) ([]byte, error)
- func PubKey2Address(p ecdsa.PublicKey) string
- func PubKey2Bytes(pub *ecdsa.PublicKey) []byte
- func SigToPub(hash, sig []byte) (*ecdsa.PublicKey, error)
- func Sign(hash []byte, prv *ecdsa.PrivateKey) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPrivateKey ¶
func NewPrivateKey(privateKeyBytes []byte) (*ecdsa.PrivateKey, error)
func NewPrivateKeyByHex ¶
func NewPrivateKeyByHex(privateKeyHex string) (*ecdsa.PrivateKey, error)
func PersonalSignByPrivateKey ¶
func PersonalSignByPrivateKey(message []byte, privateKey *ecdsa.PrivateKey) ([]byte, error)
func PubKey2Address ¶
func PubKey2Bytes ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.