Documentation
¶
Index ¶
- func AddressFromPublicKey(publicKey *ecdsa.PublicKey) []byte
- func GeneratePrivateKey() (*ecdsa.PrivateKey, error)
- func HashData(data []byte) []byte
- func MarshalPrivateKey(privateKey *ecdsa.PrivateKey) []byte
- func MarshalPublicKey(publicKey *ecdsa.PublicKey) []byte
- func PublicKeyFromPrivateKey(privateKey *ecdsa.PrivateKey) (*ecdsa.PublicKey, error)
- func PublicKeyFromSignature(data []byte, signature []byte) ([]byte, error)
- func SignData(data []byte, privateKey []byte) ([]byte, error)
- func UnmarshalPrivateKey(privateKey []byte) (*ecdsa.PrivateKey, error)
- func UnmarshalPublicKey(publicKey []byte) (*ecdsa.PublicKey, error)
- func VerifySignature(data []byte, publicKey []byte, signature []byte) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddressFromPublicKey ¶
func GeneratePrivateKey ¶
func GeneratePrivateKey() (*ecdsa.PrivateKey, error)
func MarshalPrivateKey ¶
func MarshalPrivateKey(privateKey *ecdsa.PrivateKey) []byte
func MarshalPublicKey ¶
func PublicKeyFromPrivateKey ¶
func PublicKeyFromPrivateKey(privateKey *ecdsa.PrivateKey) (*ecdsa.PublicKey, error)
func PublicKeyFromSignature ¶
func UnmarshalPrivateKey ¶
func UnmarshalPrivateKey(privateKey []byte) (*ecdsa.PrivateKey, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.