eth

package
v0.1.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2026 License: MIT Imports: 3 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hash

func Hash(message []byte) []byte

Hash calculates a hash for given message using Ethereum crypto 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

func PublicKeyBytes(publicKey *ecdsa.PublicKey) []byte

PublicKeyBytes returns bytes representation of secp256p1 public key

func Sign

func Sign(digest []byte, privateKey *ecdsa.PrivateKey) ([]byte, error)

Sign calculates an ECDSA signature using Ethereum crypto functions

func Verify

func Verify(publicKey, digest, signature []byte) bool

Verify checks that the given public key created signature over digest using Ethereum crypto functions

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL