encryption

package
v1.0.0-rc9 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const RegistryVersion = 1

Variables

View Source
var ErrMigrationUnfinished = errors.New("finish the encryption migration before creating a data key")

Functions

func ForDB

func ForDB(tx *gorm.DB, encryptor crypto.Encryptor) crypto.Encryptor

ForDB binds application encryption key lookups to the caller's DB handle. Other encryptors do not query the data key table.

func NewApplicationEncryptor

func NewApplicationEncryptor(versioned *crypto.VersionedEncryptor, store *Store) crypto.Encryptor

Types

type Auditor

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

func (*Auditor) ProcessBatch

func (a *Auditor) ProcessBatch(tx *gorm.DB) ([]error, error)

type Migrator

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

func (*Migrator) ProcessBatch

func (m *Migrator) ProcessBatch(ctx context.Context, tx *gorm.DB) ([]error, error)

type Store

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

func NewStore

func NewStore(masters crypto.MasterKeys, primary string) *Store

func (*Store) Active

func (s *Store) Active(ctx context.Context) (crypto.DataKey, error)

func (*Store) CreateAndActivateDataKey

func (s *Store) CreateAndActivateDataKey(ctx context.Context) (uuid.UUID, error)

func (*Store) Find

func (s *Store) Find(ctx context.Context, id uuid.UUID) (crypto.DataKey, error)

func (*Store) Initialize

func (s *Store) Initialize(ctx context.Context) error

func (*Store) List

func (*Store) PrimaryMasterKeyRef

func (s *Store) PrimaryMasterKeyRef() string

func (*Store) Rewrap

func (s *Store) Rewrap(ctx context.Context) error

Jump to

Keyboard shortcuts

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