jwk

package
Version: v0.0.0-...-71bbcca Latest Latest
Warning

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

Go to latest
Published: May 14, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key struct {
	KeyType string `json:"kty,omitempty"`

	ParameterN string `json:"n,omitempty"`
	ParameterE string `json:"e,omitempty"`
	ParameterD string `json:"d,omitempty"`

	ParameterP string `json:"p,omitempty"`
	ParameterQ string `json:"q,omitempty"`

	ParameterDP string `json:"dp,omitempty"`
	ParameterDQ string `json:"dq,omitempty"`
	ParameterQI string `json:"qi,omitempty"`
}

Key is a JSON web key.

func (Key) Modulus

func (k Key) Modulus() (*big.Int, error)

Modulus is the modulus component.

func (Key) PrivateExponent

func (k Key) PrivateExponent() (*big.Int, error)

PrivateExponent is the private exponent component.

func (Key) PublicExponent

func (k Key) PublicExponent() (*big.Int, error)

PublicExponent is the public exponent component.

func (Key) RSAPrivateKey

func (k Key) RSAPrivateKey() (*pem.Block, error)

RSAPrivateKey builds an RSA private key PEM block.

func (Key) RSAPublicKey

func (k Key) RSAPublicKey() (*pem.Block, error)

RSAPublicKey builds an RSA public key PEM block.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL