Documentation ¶
Index ¶
- type Config
- type Keyring
- func (k *Keyring) CreateKey(ctx context.Context, ringID string) (*vaultv1.DataEncryptionKey, error)
- func (k *Keyring) DecodeAndDecryptKey(ctx context.Context, b []byte) (*vaultv1.DataEncryptionKey, string, error)
- func (k *Keyring) EncryptAndEncodeKey(ctx context.Context, dek *vaultv1.DataEncryptionKey) ([]byte, error)
- func (k *Keyring) GetKey(ctx context.Context, ringID, keyID string) (*vaultv1.DataEncryptionKey, error)
- func (k *Keyring) GetLatestKey(ctx context.Context, ringID string) (*vaultv1.DataEncryptionKey, error)
- func (k *Keyring) GetOrCreateKey(ctx context.Context, ringID, keyID string) (*vaultv1.DataEncryptionKey, error)
- func (k *Keyring) RollKeys(ctx context.Context, ringID string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Store storage.Storage Logger logging.Logger DecryptionKeys map[string]*vaultv1.KeyEncryptionKey EncryptionKey *vaultv1.KeyEncryptionKey }
type Keyring ¶
type Keyring struct {
// contains filtered or unexported fields
}
func (*Keyring) DecodeAndDecryptKey ¶
func (*Keyring) EncryptAndEncodeKey ¶
func (*Keyring) GetLatestKey ¶
func (k *Keyring) GetLatestKey(ctx context.Context, ringID string) (*vaultv1.DataEncryptionKey, error)
GetLatestKey returns the latest key from the keyring. If no key is found, it creates a new key.
func (*Keyring) GetOrCreateKey ¶
Click to show internal directories.
Click to hide internal directories.