crypto

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashPassword

func HashPassword(password string) (string, error)

HashPassword hashes a password using bcrypt with a cost factor of 12

func VerifyMessageSignature

func VerifyMessageSignature(pubkeyHex, signatureHex, content, room string, timestamp int64) error

VerifyMessageSignature verifies a Nostr-style message signature This matches the signing logic in the frontend

func VerifyMessageSignatureBTCD

func VerifyMessageSignatureBTCD(pubkeyHex, signatureHex, content, room string, timestamp int64) error

VerifyMessageSignatureBTCD verifies a signature using btcd library This is more compatible with noble-secp256k1

func VerifyPassword

func VerifyPassword(password, hash string) error

VerifyPassword verifies a password against a bcrypt hash

Types

This section is empty.

Jump to

Keyboard shortcuts

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