ecdsa

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: 8 Imported by: 0

Documentation

Overview

Package ecdsa provides ECDSA signing methods for JWT.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrVerifyFailed is returned when signature verification fails.
	ErrVerifyFailed = errors.New("jwt/ecdsa: verification failed")

	// ErrInvalidKey is returned when the given key is not a valid ECDSA key.
	ErrInvalidKey = errors.New("jwt/ecdsa: invalid key")

	// ErrInvalidSignature is returned when the signature provided cannot be decoded.
	ErrInvalidSignature = errors.New("jwt/ecdsa: invalid signature")

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

Functions

func SignES256

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

SignES256 signs a token with the provided secret using ECDSA SHA-256.

func SignES384

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

SignES384 signs a token with the provided secret using ECDSA SHA-384.

func SignES512

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

SignES512 signs a token with the provided secret using ECDSA SHA-512.

func VerifyES256

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

VerifyES256 verifies the given signature using the given secret.

func VerifyES384

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

VerifyES384 verifies the given signature using the given secret.

func VerifyES512

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

VerifyES512 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