Documentation ¶
Index ¶
- func Hash160(s []byte) [20]byte
- func MarshalPrivateKey(priv *ecdsa.PrivateKey) []byte
- func MarshalPublicKey(pub *ecdsa.PublicKey) []byte
- func NewPrivateKey() (priv *ecdsa.PrivateKey, err error)
- func ParsePrivateKey(data []byte) *ecdsa.PrivateKey
- func ParsePublicKey(data []byte) *ecdsa.PublicKey
- func RetrievePublicKey(hash, sig []byte) ([]byte, error)
- func S256() elliptic.Curve
- func Sign(hash []byte, priv *ecdsa.PrivateKey) (sig []byte, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalPrivateKey ¶
func MarshalPrivateKey(priv *ecdsa.PrivateKey) []byte
Returns bytes representation of private key (code borrowed from ethereum project)
func MarshalPublicKey ¶
Returns bytes representation of public key (code borrowed from ethereum project)
func NewPrivateKey ¶
func NewPrivateKey() (priv *ecdsa.PrivateKey, err error)
func ParsePrivateKey ¶
func ParsePrivateKey(data []byte) *ecdsa.PrivateKey
Parses bytes representation of private key (code borrowed from ethereum project)
func ParsePublicKey ¶
Parses bytes representation of public key (code borrowed from ethereum project)
func RetrievePublicKey ¶
Retrieves public key from signature used to sign hash
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.