Documentation
ΒΆ
Index ΒΆ
- func DERToRawECDSA(alg Alg, der []byte) ([]byte, error)
- type AESGCMEncryptor
- type Alg
- type CachedKey
- type EncryptedKey
- type Encryptor
- type JWK
- type JWKS
- type Key
- type KeyManager
- func (km *KeyManager) InitKeys(algs []Alg) error
- func (km *KeyManager) JWKS() ([]byte, error)
- func (km *KeyManager) ReloadCache() error
- func (km *KeyManager) Rotate(alg Alg) error
- func (km *KeyManager) RotateExpired() error
- func (km *KeyManager) Sign(alg Alg, build func(kid string) ([]byte, error)) ([]byte, error)
- func (km *KeyManager) Verify(kid string, payload, sig []byte) error
- type MockEncryptor
- type MockStore
- type RotationConfig
- type RotationPolicy
- type Store
Constants ΒΆ
This section is empty.
Variables ΒΆ
This section is empty.
Functions ΒΆ
Types ΒΆ
type AESGCMEncryptor ΒΆ
type AESGCMEncryptor struct {
// contains filtered or unexported fields
}
func NewAESGCMEncryptor ΒΆ
func NewAESGCMEncryptor(masterKey []byte) (*AESGCMEncryptor, error)
func (*AESGCMEncryptor) Decrypt ΒΆ
func (e *AESGCMEncryptor) Decrypt(enc *EncryptedKey) ([]byte, error)
func (*AESGCMEncryptor) Encrypt ΒΆ
func (e *AESGCMEncryptor) Encrypt(privateKey []byte) (*EncryptedKey, error)
type EncryptedKey ΒΆ
type Encryptor ΒΆ
type Encryptor interface {
Encrypt(privateKey []byte) (*EncryptedKey, error)
Decrypt(encrypted *EncryptedKey) ([]byte, error)
}
type KeyManager ΒΆ
type KeyManager struct {
// contains filtered or unexported fields
}
func NewKeyManager ΒΆ
func NewKeyManager( store Store, enc Encryptor, policy RotationPolicy, ) (*KeyManager, error)
func (*KeyManager) InitKeys ΒΆ added in v0.0.3
func (km *KeyManager) InitKeys(algs []Alg) error
func (*KeyManager) JWKS ΒΆ
func (km *KeyManager) JWKS() ([]byte, error)
func (*KeyManager) ReloadCache ΒΆ
func (km *KeyManager) ReloadCache() error
func (*KeyManager) Rotate ΒΆ
func (km *KeyManager) Rotate(alg Alg) error
func (*KeyManager) RotateExpired ΒΆ
func (km *KeyManager) RotateExpired() error
type MockEncryptor ΒΆ
type MockEncryptor struct {
ForceDecryptError bool
}
func (MockEncryptor) Decrypt ΒΆ
func (m MockEncryptor) Decrypt(e *EncryptedKey) ([]byte, error)
func (MockEncryptor) Encrypt ΒΆ
func (m MockEncryptor) Encrypt(b []byte) (*EncryptedKey, error)
type MockStore ΒΆ
func NewMockStore ΒΆ
func NewMockStore() *MockStore
type RotationConfig ΒΆ
type RotationPolicy ΒΆ
type RotationPolicy func() (RotationConfig, error)
Click to show internal directories.
Click to hide internal directories.