You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
374 B

package jose
import (
type Verifier interface {
ID() string
Alg() string
Verify(sig []byte, data []byte) error
type Signer interface {
Sign(data []byte) (sig []byte, err error)
func NewVerifier(jwk JWK) (Verifier, error) {
if jwk.Type != "RSA" {
return nil, fmt.Errorf("unsupported key type %q", jwk.Type)
return NewVerifierRSA(jwk)