rsa

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2015 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package rsa provides RSA signing methods for JWT.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidKey is returned when the given key is not a valid RSA key.
	ErrInvalidKey = errors.New("jwt/rsa: invalid key")

	// ErrUnsupportedKeyType is returned when the secret is not a supported type.
	ErrUnsupportedKeyType = errors.New("jwt/rsa: unsupported key type")
)

Functions

func SignRS256

func SignRS256(token string, secret interface{}) (string, error)

SignRS256 signs a token with the provided secret using RSA SHA-256.

func SignRS384

func SignRS384(token string, secret interface{}) (string, error)

SignRS384 signs a token with the provided secret using RSA SHA-384.

func SignRS512

func SignRS512(token string, secret interface{}) (string, error)

SignRS512 signs a token with the provided secret using RSA SHA-512.

func VerifyRS256

func VerifyRS256(token, signature string, secret interface{}) error

VerifyRS256 verifies the given signature using the given secret.

func VerifyRS384

func VerifyRS384(token, signature string, secret interface{}) error

VerifyRS384 verifies the given signature using the given secret.

func VerifyRS512

func VerifyRS512(token, signature string, secret interface{}) error

VerifyRS512 verifies the given signature using the given secret.

Types

This section is empty.

Jump to

Keyboard shortcuts

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