Files
opentf/internal/encryption/keyprovider/keyprovider.go
Janos a18e643a8d PBKDF2 passphrase key provider (#1310)
Signed-off-by: Janos <86970079+janosdebugs@users.noreply.github.com>
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
Co-authored-by: Christian Mesh <christianmesh1@gmail.com>
Co-authored-by: James Humphries <jamesh@spacelift.io>
2024-03-11 14:24:31 +01:00

17 lines
794 B
Go

// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package keyprovider
// KeyProvider is the usable key provider. The Provide function is responsible for creating both the decryption and
// encryption key, as well as returning the metadata to be stored.
type KeyProvider interface {
// Provide provides an encryption and decryption keys. If the process fails, it returns an error.
//
// The caller must pass in the same struct obtained from the Build function of the Config, with the decryption
// metadata read in. If no decryption metadata is present, the caller must pass in the struct unmodified.
Provide(decryptionMeta KeyMeta) (keysOutput Output, encryptionMeta KeyMeta, err error)
}