Documentation
¶
Overview ¶
Package raw contains Raw Master Key implementation.
Index ¶
- type KeyFactory
- type KeyHandler
- type MasterKey
- func (rawMK *MasterKey) DecryptDataKey(_ context.Context, encryptedDataKey model.EncryptedDataKeyI, ...) (model.DataKeyI, error)
- func (rawMK *MasterKey) EncryptDataKey(_ context.Context, dk model.DataKeyI, alg *suite.AlgorithmSuite, ...) (model.EncryptedDataKeyI, error)
- func (rawMK *MasterKey) GenerateDataKey(_ context.Context, alg *suite.AlgorithmSuite, ec suite.EncryptionContext) (model.DataKeyI, error)
- func (rawMK *MasterKey) OwnsDataKey(key model.Key) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyFactory ¶
type KeyFactory struct{}
KeyFactory is a factory for creating RawMasterKey.
func (*KeyFactory) NewMasterKey ¶
func (f *KeyFactory) NewMasterKey(args ...interface{}) (model.MasterKey, error)
NewMasterKey factory method returns a new instance of Raw MasterKey.
type KeyHandler ¶
KeyHandler is an interface specific to the RawMasterKey which is used by Raw Master Key Provider.
type MasterKey ¶
type MasterKey struct { keys.BaseKey Encrypter model.GcmCrypter // contains filtered or unexported fields }
MasterKey contains the Raw Master Key and implements the model.MasterKey interface.
func (*MasterKey) DecryptDataKey ¶
func (rawMK *MasterKey) DecryptDataKey(_ context.Context, encryptedDataKey model.EncryptedDataKeyI, alg *suite.AlgorithmSuite, ec suite.EncryptionContext) (model.DataKeyI, error)
DecryptDataKey decrypts the encrypted data key and returns the data key.
func (*MasterKey) EncryptDataKey ¶
func (rawMK *MasterKey) EncryptDataKey(_ context.Context, dk model.DataKeyI, alg *suite.AlgorithmSuite, ec suite.EncryptionContext) (model.EncryptedDataKeyI, error)
EncryptDataKey encrypts the data key and returns the encrypted data key.
func (*MasterKey) GenerateDataKey ¶
func (rawMK *MasterKey) GenerateDataKey(_ context.Context, alg *suite.AlgorithmSuite, ec suite.EncryptionContext) (model.DataKeyI, error)
GenerateDataKey generates a new data key and returns it.
Click to show internal directories.
Click to hide internal directories.