key

package
v1.0.20 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2022 License: AGPL-3.0 Imports: 0 Imported by: 1

Documentation

Overview

Package key contains the definition of the Key Provider, as well as various implementations of the concept.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Keys

type Keys struct {
	// Object Encryption Key used for sealing Objects.
	KEK []byte `koanf:"kek"`

	// Access Encryption Key used for sealing Access lists.
	AEK []byte `koanf:"aek"`

	// Token Encryption Key used for sealing Tokens.
	TEK []byte `koanf:"tek"`

	// Index Encryption Key used for searchable encryption.
	IEK []byte `koanf:"iek"`
}

Keys contains the master key material used by D1. All keys must be 32 bytes.

type Provider

type Provider interface {
	// GetKeys returns a set of keys.
	GetKeys() (Keys, error)
}

Provider is the interface a Key Provider must implement to serve keys to D1.

type Static

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

Static implements a Key Provider which returns a fixed set of keys.

func NewStatic

func NewStatic(keys Keys) Static

NewStatic creates a new Static key provider which returns the given Keys.

func (*Static) GetKeys

func (s *Static) GetKeys() (Keys, error)

GetKeys returns the static set of keys.

Jump to

Keyboard shortcuts

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