Documentation ¶
Overview ¶
Package keys contains implementations of Master Keys and generic key errors.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrDecryptKey = errors.New("unable to decrypt data key")
ErrDecryptKey is returned when the data key cannot be decrypted.
var ErrEncryptKey = errors.New("unable to encrypt data key")
ErrEncryptKey is returned when the data key cannot be encrypted.
var ErrGenerateDataKey = errors.New("unable to generate data key")
ErrGenerateDataKey is returned when the data key cannot be generated.
Functions ¶
This section is empty.
Types ¶
type BaseKey ¶ added in v0.1.0
type BaseKey struct {
// contains filtered or unexported fields
}
BaseKey is implementation of model.MasterKeyBase that methods can be reused or overridden by other master key implementations.
func NewBaseKey ¶ added in v0.1.0
NewBaseKey returns a new instance of BaseKey.
func (*BaseKey) Metadata ¶ added in v0.1.0
Metadata returns the model.KeyMeta metadata of the master key.
func (*BaseKey) OwnsDataKey ¶ added in v0.1.0
OwnsDataKey returns true if key is owned by the master key. In other words, the key was encrypted with the master key.
Raw Master Key and KMS MRK Master Key implementations are using a different logic to determine if the key is owned by the master key.