Documentation ¶
Index ¶
- func Backend() *framework.Backend
- func Factory(conf *logical.BackendConfig) (logical.Backend, error)
- type KeyEntry
- type KeyEntryMap
- type Policy
- func (p *Policy) Decrypt(context []byte, value string) (string, error)
- func (p *Policy) DeriveKey(context []byte, ver int) ([]byte, error)
- func (p *Policy) Encrypt(context []byte, value string) (string, error)
- func (p *Policy) Persist(storage logical.Storage, name string) error
- func (p *Policy) Serialize() ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type KeyEntryMap ¶ added in v0.3.0
KeyEntryMap is used to allow JSON marshal/unmarshal
func (KeyEntryMap) MarshalJSON ¶ added in v0.3.0
func (kem KeyEntryMap) MarshalJSON() ([]byte, error)
MarshalJSON implements JSON marshaling
func (KeyEntryMap) UnmarshalJSON ¶ added in v0.3.0
func (kem KeyEntryMap) UnmarshalJSON(data []byte) error
MarshalJSON implements JSON unmarshaling
type Policy ¶
type Policy struct { Name string `json:"name"` Key []byte `json:"key,omitempty"` //DEPRECATED Keys KeyEntryMap `json:"keys"` CipherMode string `json:"cipher"` // Derived keys MUST provide a context and the // master underlying key is never used. Derived bool `json:"derived"` KDFMode string `json:"kdf_mode"` // The minimum version of the key allowed to be used // for decryption MinDecryptionVersion int `json:"min_decryption_version"` // Whether the key is allowed to be deleted DeletionAllowed bool `json:"deletion_allowed"` }
Policy is the struct used to store metadata
func (*Policy) DeriveKey ¶ added in v0.2.0
DeriveKey is used to derive the encryption key that should be used depending on the policy. If derivation is disabled the raw key is used and no context is required, otherwise the KDF mode is used with the context to derive the proper key.
Click to show internal directories.
Click to hide internal directories.