Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SetupCMM = func(keyIDs []string, opts ...func(options *config.LoadOptions) error) model.CryptoMaterialsManager { var kp model.MasterKeyProvider if len(keyIDs) > 0 { keyProvider, err := kmsprovider.NewWithOpts( keyIDs, kmsprovider.WithAwsLoadOptions(opts...), ) if err != nil { log.Error().Err(err).Msg("setupCMM") return nil } kp = keyProvider } else { keyProvider, err := kmsprovider.NewWithOpts( nil, kmsprovider.WithAwsLoadOptions(opts...), kmsprovider.WithDiscovery(), ) if err != nil { log.Error().Err(err).Msg("setupCMM") return nil } kp = keyProvider } cmm, _ := materials.NewDefault(kp) return cmm }
View Source
var SetupClient = func(maxEdk int, cp suite.CommitmentPolicy) *client.Client { var p suite.CommitmentPolicy if cp == 0 { p = suite.CommitmentPolicyRequireEncryptRequireDecrypt } else { p = cp } cfg, err := clientconfig.NewConfigWithOpts( clientconfig.WithCommitmentPolicy(p), clientconfig.WithMaxEncryptedDataKeys(maxEdk), ) if err != nil { panic(err) } c := client.NewClientWithConfig(cfg) return c }
View Source
var SetupDecryptCmd = func(keyIDs []string, ec map[string]string, frame int, edk int, _ string, policy suite.CommitmentPolicy) *CliCmd { return NewDecryptCmd(keyIDs, ec, frame, edk, policy) }
View Source
var SetupEncryptCmd = func(keyIDs []string, ec map[string]string, frame int, edk int, alg string, policy suite.CommitmentPolicy) *CliCmd { return NewEncryptCmd(keyIDs, ec, frame, edk, alg, policy) }
Functions ¶
func AlgSuffix ¶
func AlgSuffix(as *suite.AlgorithmSuite) string
Types ¶
type CliCmd ¶
type CliCmd struct {
// contains filtered or unexported fields
}
func NewDecryptCmd ¶
func NewEncryptCmd ¶
func NewVersionCmd ¶
func NewVersionCmd() *CliCmd
Click to show internal directories.
Click to hide internal directories.