crypto

package
v0.0.0-...-4c1c0a6 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddressFromPublicKey

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

func GeneratePrivateKey

func GeneratePrivateKey() (*ecdsa.PrivateKey, error)

func HashData

func HashData(data []byte) []byte

func MarshalPrivateKey

func MarshalPrivateKey(privateKey *ecdsa.PrivateKey) []byte

func MarshalPublicKey

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

func PublicKeyFromPrivateKey

func PublicKeyFromPrivateKey(privateKey *ecdsa.PrivateKey) (*ecdsa.PublicKey, error)

func PublicKeyFromSignature

func PublicKeyFromSignature(data []byte, signature []byte) ([]byte, error)

func SignData

func SignData(data []byte, privateKey []byte) ([]byte, error)

func UnmarshalPrivateKey

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

func UnmarshalPublicKey

func UnmarshalPublicKey(publicKey []byte) (*ecdsa.PublicKey, error)

func VerifySignature

func VerifySignature(data []byte, publicKey []byte, signature []byte) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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