crypto

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2025 License: MIT Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateKeys

func GenerateKeys() error

GenerateKeys generates a new ECDSA key pair and stores it in the environment.

func LoadPrivateKey

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

LoadPrivateKey retrieves the private key from environment variables.

func LoadPublicKey

func LoadPublicKey() (string, error)

LoadPublicKey retrieves the public key from environment variables.

func SignMessage

func SignMessage(privateKey *ecdsa.PrivateKey, message string) (string, error)

SignMessage signs the given message using ECDSA.

func VerifySignature

func VerifySignature(publicKeyHex, message, signature string) (bool, error)

VerifySignature verifies an ECDSA signature.

Types

This section is empty.

Jump to

Keyboard shortcuts

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