seal

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GenerateOption

type GenerateOption func(o *GenerateOptions)

GenerateOption represents functional pattern builder for optional parameters.

func WithDeterministicKey

func WithDeterministicKey(masterKey *memguard.LockedBuffer, target string) GenerateOption

WithDeterministicKey enables deterministic container key generation.

func WithRandom

func WithRandom(random io.Reader) GenerateOption

WithRandom provides the random source for key generation.

type GenerateOptions

type GenerateOptions struct {
	DCKDMasterKey *memguard.LockedBuffer
	DCKDTarget    string
	RandomSource  io.Reader
}

GenerateOptions represents container key generation options.

type Strategy

type Strategy interface {
	// CenerateKey create an key pair used as container identifier.
	GenerateKey(...GenerateOption) (publicKey, privateKey string, err error)
	// Seal the given container using the implemented algorithm.
	Seal(io.Reader, *containerv1.Container, ...string) (*containerv1.Container, error)
	// Unseal the given container using the given identity.
	Unseal(*containerv1.Container, *memguard.LockedBuffer) (*containerv1.Container, error)
}

Streategy describes the sealing/unsealing contract.

Directories

Path Synopsis
Licensed to Elasticsearch B.V. under one or more contributor license agreements.
Licensed to Elasticsearch B.V. under one or more contributor license agreements.
Licensed to Elasticsearch B.V. under one or more contributor license agreements.
Licensed to Elasticsearch B.V. under one or more contributor license agreements.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳