Documentation ¶
Index ¶
- func LoadJSONWebKey(json []byte, pub bool) (*jose.JSONWebKey, error)
- func LoadPrivateKey(data []byte) (interface{}, error)
- func LoadPublicKey(data []byte) (interface{}, error)
- func NewEncryptionKey(alg jose.KeyAlgorithm, bits int) (crypto.PublicKey, crypto.PrivateKey, error)
- func NewSigningKey(alg jose.SignatureAlgorithm, bits int) (crypto.PublicKey, crypto.PrivateKey, error)
- func ToPublicKey(k *jose.JSONWebKey) jose.JSONWebKey
- type Base64Reader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadJSONWebKey ¶
LoadJSONWebKey returns a *jose.JSONWebKey for a given JSON string.
func LoadPrivateKey ¶
LoadPrivateKey loads a private key from PEM/DER/JWK-encoded data.
func LoadPublicKey ¶
LoadPublicKey loads a public key from PEM/DER/JWK-encoded data.
func NewEncryptionKey ¶
NewEncryptionKey generates a keypair for corresponding KeyAlgorithm.
func NewSigningKey ¶
func NewSigningKey(alg jose.SignatureAlgorithm, bits int) (crypto.PublicKey, crypto.PrivateKey, error)
NewSigningKey generates a keypair for corresponding SignatureAlgorithm.
func ToPublicKey ¶
func ToPublicKey(k *jose.JSONWebKey) jose.JSONWebKey
ToPublicKey returns the public key of the given private key.
Types ¶
type Base64Reader ¶
Base64Reader wraps an input stream consisting of either standard or url-safe base64 data, and maps it to a raw (unpadded) standard encoding. This can be used to read any base64-encoded data as input, whether padded, unpadded, standard or url-safe.
Click to show internal directories.
Click to hide internal directories.