Documentation ¶
Index ¶
- func Hash(message []byte) []byte
- func NewKey() (*ecdsa.PrivateKey, error)
- func PrivateKeyBytes(privateKey *ecdsa.PrivateKey) []byte
- func PrivateKeyFromBytes(bytes []byte) (*ecdsa.PrivateKey, error)
- func PublicKeyBytes(publicKey *ecdsa.PublicKey) []byte
- func Sign(digest []byte, privateKey *ecdsa.PrivateKey) ([]byte, error)
- func Verify(publicKey, digest, signature []byte) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewKey ¶
func NewKey() (*ecdsa.PrivateKey, error)
NewKey generates new secp256k1 key using Ethereum crypto functions
func PrivateKeyBytes ¶
func PrivateKeyBytes(privateKey *ecdsa.PrivateKey) []byte
PrivateKeyBytes returns bytes representation of secp256p1 private key
func PrivateKeyFromBytes ¶
func PrivateKeyFromBytes(bytes []byte) (*ecdsa.PrivateKey, error)
PrivateKeyFromBytes creates a secp256k1 private key from its bytes representation
func PublicKeyBytes ¶
PublicKeyBytes returns bytes representation of secp256p1 public key
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.