Documentation ¶
Index ¶
Constants ¶
View Source
const ( ClaimKty = "kty" ClaimAlg = "alg" ClaimUse = "use" ClaimKid = "kid" )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Header ¶
type Header struct { Kty KeyType Alg jwa.KeyAlgorithm `json:"alg,omitempty` Kid string `json:"kid,omitempty` Use KeyUsage `json:"use,omitempty` }
Header represents the JWK claims shared by every key type
func (Header) Algorithm ¶
func (h Header) Algorithm() jwa.KeyAlgorithm
type Key ¶
type Key interface { // Type returns the type of the key (`kty` claim) Type() KeyType // Alg returns the algorithm of the key (`alg“ claim) Algorithm() jwa.KeyAlgorithm // ID returns the unique identifier of the key (`kid` claim) ID() string // Usage returns the usage of the key (`use` claim) Usage() KeyUsage // Thumbprint returns the JWK thumbprint of the key. Thumbprint(hash crypto.Hash) ([]byte, error) }
func ParseString ¶
type RSAPrivateKey ¶
type RSAPrivateKey struct { Header // contains filtered or unexported fields }
func (RSAPrivateKey) Thumbprint ¶
func (k RSAPrivateKey) Thumbprint(hash crypto.Hash) ([]byte, error)
type RSAPublicKey ¶
type RSAPublicKey struct { Header // contains filtered or unexported fields }
func (RSAPublicKey) Thumbprint ¶
func (k RSAPublicKey) Thumbprint(hash crypto.Hash) ([]byte, error)
Click to show internal directories.
Click to hide internal directories.