sign

package
v0.0.0-...-a4e98f0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadPrivateKey

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

func LoadPrivateKeyFromFile

func LoadPrivateKeyFromFile(filePath string) (*ecdsa.PrivateKey, error)

LoadPrivateKeyFromFile loads a EC private key from file

func NewBase64Encoder

func NewBase64Encoder() *base64Encoder

NewBase64Encoder is a constructor function for the base64Encoder type

func NewECDSA

func NewECDSA(privKey *ecdsa.PrivateKey, hasher Hasher, encoder Encoder) *ecdsaSigner

NewECDSA is a constructor function for the ecdsaSigner type

func NewSHA256Hasher

func NewSHA256Hasher() *sha256Hasher

NewSHA256Hasher is a constructor function for the sha256Hasher type

Types

type Encoder

type Encoder interface {
	Encode([]byte) string
	Decode(string) ([]byte, error)
}

type Hasher

type Hasher interface {
	Hash([]byte) []byte
}

Jump to

Keyboard shortcuts

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