es512

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Signer

type Signer struct {
	// contains filtered or unexported fields
}

func NewSigner

func NewSigner() (*Signer, error)

func NewSignerFromPrivateKey

func NewSignerFromPrivateKey(privateKey crypto.PrivateKey) (*Signer, error)

func (*Signer) Alg

func (signer *Signer) Alg() model.Algorithm

func (*Signer) Public

func (signer *Signer) Public() crypto.PublicKey

func (*Signer) Sign

func (signer *Signer) Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) (signature []byte, err error)

type Validator

type Validator struct {
	// contains filtered or unexported fields
}

func NewValidator

func NewValidator(publicKey crypto.PublicKey) (*Validator, error)

func NewValidatorFromJwk

func NewValidatorFromJwk(publicKeyJson []byte) (*Validator, error)

func (*Validator) Public

func (validator *Validator) Public() crypto.PublicKey

func (*Validator) ValidateSignature

func (validator *Validator) ValidateSignature(digest, signature []byte) (bool, error)

Jump to

Keyboard shortcuts

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