Documentation ¶
Index ¶
- Constants
- func DecryptJWK(aeskey []byte, encrypted []byte) (jwkey jwk.Key, err error)
- func EncryptJWK(aeskey []byte, jwkey jwk.Key) (enc []byte, err error)
- func GeneratePrivateJWK(expiration time.Time) (key jwk.Key, err error)
- func GetPublicJWK(key jwk.Key) (jwk.Key, error)
- func KeyStateString(state KeyState) string
- func ParseJWKSet(src []byte) (rs jwk.Set, err error)
- type KeyState
Constants ¶
View Source
const KeyCurve = jwa.P256
Variables ¶
This section is empty.
Functions ¶
func DecryptJWK ¶
Decrypt an AES-GCM encrypted JWK
func EncryptJWK ¶
Encrypt a JWK Key with encryption key Uses AES-GCM with a random nonce. The nonce is pre-pended to ciphertext.
func GeneratePrivateJWK ¶
Generate a private key with additional properties alg: based on key type (ES256 for P256) exp: expiration time (Unix timestamp) kid: base64 SHA-256 thumbprint use: "sig"
func KeyStateString ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.