verify

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2021 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 ECDSAVerifier

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

func (ECDSAVerifier) Verify

func (v ECDSAVerifier) Verify(payload []byte, signature []byte, key interface{}) error

type HMACVerifier

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

func (HMACVerifier) Verify

func (v HMACVerifier) Verify(payload, signature []byte, key interface{}) (err error)

type RSAVerifier

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

func (RSAVerifier) Verify

func (v RSAVerifier) Verify(payload, signature []byte, key interface{}) error

type Verifier

type Verifier interface {
	// Verify checks whehter the payload and signature are valid for
	// the given key.
	// `key` is the key used for verifying the payload, and is usually
	// the public key associated with the signature method. For example,
	// for `jwa.RSXXX` and `jwa.PSXXX` types, you need to pass the
	// `*"crypto/rsa".PublicKey` type.
	// Check the documentation for each verifier for details
	Verify(payload []byte, signature []byte, key interface{}) error
}

func New

New creates a new JWS verifier using the specified algorithm and the public key

Jump to

Keyboard shortcuts

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