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 {
// GenerateKey create a 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)
}
Strategy describes the sealing/unsealing contract.
Click to show internal directories.
Click to hide internal directories.