Documentation ¶
Index ¶
- func FetchPubKeyBySignMsg(sign, msg string) (*ecdsa.PublicKey, error)
- func PubKeyToAddress(pubKey *ecdsa.PublicKey) common.Address
- func VerifySignature(publicKey, sign, msg string) bool
- func VerifySignatureByAddress(address, sign, msg string) bool
- type PrivateKey
- func GetFromStore(dir, name string) (*PrivateKey, error)
- func NewPrivateKey() (*PrivateKey, error)
- func NewPrivateKeyByBase58(keyBase string) (*PrivateKey, error)
- func NewPrivateKeyByEthPri(priKey *ecdsa.PrivateKey) (*PrivateKey, error)
- func NewPrivateKeyByLibP2pPri(priKey crypto.PrivKey) (*PrivateKey, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func VerifySignature ¶
Types ¶
type PrivateKey ¶
type PrivateKey struct { EthPrivate *ecdsa.PrivateKey LibP2pPrivate crypto.PrivKey }
func GetFromStore ¶
func GetFromStore(dir, name string) (*PrivateKey, error)
func NewPrivateKey ¶
func NewPrivateKey() (*PrivateKey, error)
func NewPrivateKeyByBase58 ¶
func NewPrivateKeyByBase58(keyBase string) (*PrivateKey, error)
func NewPrivateKeyByEthPri ¶
func NewPrivateKeyByEthPri(priKey *ecdsa.PrivateKey) (*PrivateKey, error)
func NewPrivateKeyByLibP2pPri ¶
func NewPrivateKeyByLibP2pPri(priKey crypto.PrivKey) (*PrivateKey, error)
func (*PrivateKey) Encode58Public ¶
func (pri *PrivateKey) Encode58Public() string
func (*PrivateKey) EncodePublic ¶
func (pri *PrivateKey) EncodePublic() []byte
func (*PrivateKey) GetEthAddress ¶
func (pri *PrivateKey) GetEthAddress() common.Address
func (*PrivateKey) PutStore ¶
func (pri *PrivateKey) PutStore(dir, keyName string) error
Click to show internal directories.
Click to hide internal directories.