rawprovider

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 3, 2024 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// contains filtered or unexported fields
}

type OptionsFunc

type OptionsFunc func(*Options) error

func WithKeyFactory

func WithKeyFactory(keyFactory model.MasterKeyFactory) OptionsFunc

func WithKeyProvider

func WithKeyProvider(keyProvider model.BaseKeyProvider) OptionsFunc

func WithStaticKey

func WithStaticKey(keyID string, key []byte) OptionsFunc

type RawKeyProvider

type RawKeyProvider[KT model.MasterKey] struct {
	// contains filtered or unexported fields
}

func NewWithOpts

func NewWithOpts(providerID string, optFns ...func(options *Options) error) (*RawKeyProvider[model.MasterKey], error)

func (*RawKeyProvider[KT]) AddMasterKey

func (rawKP *RawKeyProvider[KT]) AddMasterKey(keyID string) (model.MasterKey, error)

func (*RawKeyProvider[KT]) DecryptDataKey

func (rawKP *RawKeyProvider[KT]) DecryptDataKey(ctx context.Context, encryptedDataKey model.EncryptedDataKeyI, alg *suite.AlgorithmSuite, ec suite.EncryptionContext) (model.DataKeyI, error)

func (*RawKeyProvider[KT]) DecryptDataKeyFromList

func (rawKP *RawKeyProvider[KT]) DecryptDataKeyFromList(ctx context.Context, encryptedDataKeys []model.EncryptedDataKeyI, alg *suite.AlgorithmSuite, ec suite.EncryptionContext) (model.DataKeyI, error)

func (*RawKeyProvider[KT]) MasterKeyForDecrypt

func (rawKP *RawKeyProvider[KT]) MasterKeyForDecrypt(_ context.Context, _ model.KeyMeta) (model.MasterKey, error)

func (*RawKeyProvider[KT]) MasterKeysForDecryption

func (rawKP *RawKeyProvider[KT]) MasterKeysForDecryption() []model.MasterKey

func (*RawKeyProvider[KT]) MasterKeysForEncryption

func (rawKP *RawKeyProvider[KT]) MasterKeysForEncryption(_ context.Context, _ suite.EncryptionContext) (model.MasterKey, []model.MasterKey, error)

func (*RawKeyProvider[KT]) NewMasterKey

func (rawKP *RawKeyProvider[KT]) NewMasterKey(_ context.Context, keyID string) (model.MasterKey, error)

func (*RawKeyProvider[KT]) ProviderID

func (rawKP *RawKeyProvider[KT]) ProviderID() string

func (*RawKeyProvider[KT]) ProviderKind

func (rawKP *RawKeyProvider[KT]) ProviderKind() types.ProviderKind

func (*RawKeyProvider[KT]) ValidateMasterKey

func (rawKP *RawKeyProvider[KT]) ValidateMasterKey(keyID string) error

func (*RawKeyProvider[KT]) ValidateProviderID

func (rawKP *RawKeyProvider[KT]) ValidateProviderID(otherID string) error

type RawProvider

type RawProvider interface {
	model.MasterKeyProvider
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL