testutils

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SetupCMM = func(keyIDs []string, opts ...func(options *config.LoadOptions) error) materials.CryptoMaterialsManager {
	keyProvider, err := providers.NewKmsKeyProviderWithOpts(
		keyIDs,
		providers.WithAwsLoadOptions(opts...),
		providers.WithDiscovery(true),
	)
	if err != nil {
		log.Error().Err(err).Msg("setupCMM")
		return nil

	}

	cmm, _ := materials.NewDefault(keyProvider)

	return cmm
}
View Source
var SetupDecryptCmd = func(keyIDs []string, ec map[string]string, frame int, edk int, alg string) *CliCmd {
	return NewDecryptCmd(keyIDs, ec, frame, edk)
}
View Source
var SetupEncryptCmd = func(keyIDs []string, ec map[string]string, frame int, edk int, alg string) *CliCmd {
	return NewEncryptCmd(keyIDs, ec, frame, edk, alg)
}

Functions

func AlgSuffix

func AlgSuffix(as *suite.AlgorithmSuite) string

Types

type CliCmd

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

func NewDecryptCmd

func NewDecryptCmd(keyIDs []string, ec map[string]string, frame, edk int) *CliCmd

func NewEncryptCmd

func NewEncryptCmd(keyIDs []string, ec map[string]string, frame, edk int, alg string) *CliCmd

func NewVersionCmd

func NewVersionCmd() *CliCmd

func (*CliCmd) Run

func (c *CliCmd) Run(input []byte, wantErr bool) (output []byte, err error)

Jump to

Keyboard shortcuts

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