Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( A128CBCHS256 = AESCBCPreset{ Enc: jwa.A128CBC, Hash: crypto.SHA256, KeyLen: 32, EncKeyLen: 16, MACKeyLen: 16, TagLength: 16, } A192CBCHS384 = AESCBCPreset{ Enc: jwa.A192CBC, Hash: crypto.SHA384, KeyLen: 48, EncKeyLen: 24, MACKeyLen: 24, TagLength: 24, } A256CBCHS512 = AESCBCPreset{ Enc: jwa.A256CBC, Hash: crypto.SHA512, KeyLen: 64, EncKeyLen: 32, MACKeyLen: 32, TagLength: 32, } )
var ( A128GCM = AESGCMPreset{ Enc: jwa.A128GCM, KeyLen: 16, } A192GCM = AESGCMPreset{ Enc: jwa.A192GCM, KeyLen: 24, } A256GCM = AESGCMPreset{ Enc: jwa.A256GCM, KeyLen: 32, } )
var ErrInvalidSecret = errors.New("invalid secret")
Functions ¶
This section is empty.
Types ¶
type AESCBCDecryption ¶
type AESCBCDecryption struct {
// contains filtered or unexported fields
}
func NewAESCBCDecryption ¶
func NewAESCBCDecryption(config *AESCBCDecryptionConfig, presets AESCBCPreset) *AESCBCDecryption
NewAESCBCDecryption creates a new jwt.RecipientPlugin for a decrypted token using AES_CBC_HMAC_SHA2.
Use any of the AESCBCPreset constants to set the algorithm and hash function.
- A128CBCHS256: AES-128-CBC with HMAC-SHA-256
- A192CBCHS384: AES-192-CBC with HMAC-SHA-384
- A256CBCHS512: AES-256-CBC with HMAC-SHA-512
type AESCBCDecryptionConfig ¶
type AESCBCDecryptionConfig struct { CEKDecoder CEKDecoder AdditionalData []byte }
type AESCBCEncryption ¶
type AESCBCEncryption struct {
// contains filtered or unexported fields
}
func NewAESCBCEncryption ¶
func NewAESCBCEncryption(config *AESCBCEncryptionConfig, presets AESCBCPreset) *AESCBCEncryption
NewAESCBCEncryption creates a new jwt.ProducerPlugin for an encrypted token using AES_CBC_HMAC_SHA2.
Use any of the AESCBCPreset constants to set the algorithm and hash function.
- A128CBCHS256: AES-128-CBC with HMAC-SHA-256
- A192CBCHS384: AES-192-CBC with HMAC-SHA-384
- A256CBCHS512: AES-256-CBC with HMAC-SHA-512
type AESCBCEncryptionConfig ¶
type AESCBCEncryptionConfig struct { CEKManager CEKManager AdditionalData []byte }
type AESCBCPreset ¶
type AESGCMDecryption ¶
type AESGCMDecryption struct {
// contains filtered or unexported fields
}
func NewAESGCMDecryption ¶
func NewAESGCMDecryption(config *AESGCMDecryptionConfig, presets AESGCMPreset) *AESGCMDecryption
NewAESGCMDecryption creates a new jwt.RecipientPlugin for an encrypted token using AES-GCM.
Use any of the AESGCMPreset constants to set the algorithm and hash function.
- A128GCM: AES-128-GCM
- A192GCM: AES-192-GCM
- A256GCM: AES-256-GCM
type AESGCMDecryptionConfig ¶
type AESGCMDecryptionConfig struct { CEKDecoder CEKDecoder AdditionalData []byte }
type AESGCMEncryption ¶
type AESGCMEncryption struct {
// contains filtered or unexported fields
}
func NewAESGCMEncryption ¶
func NewAESGCMEncryption(config *AESGCMEncryptionConfig, presets AESGCMPreset) *AESGCMEncryption
NewAESGCMEncryption creates a new jwt.ProducerPlugin for an encrypted token using AES-GCM.
Use any of the AESGCMPreset constants to set the algorithm and hash function.
- A128GCM: AES-128-GCM
- A192GCM: AES-192-GCM
- A256GCM: AES-256-GCM
type AESGCMEncryptionConfig ¶
type AESGCMEncryptionConfig struct { CEKManager CEKManager AdditionalData []byte }