mirror of
https://github.com/getsops/sops.git
synced 2026-02-05 12:45:21 +01:00
Co-authored-by: Gabriel Martinez <19713226+GMartinez-Sisti@users.noreply.github.com> Co-authored-by: Felix Fontein <felix@fontein.de> Co-authored-by: Bastien Wermeille <bastien.wermeille@gmail.com> Co-authored-by: Hidde Beydals <hiddeco@users.noreply.github.com> Signed-off-by: Boris Kreitchman <bkreitch@gmail.com>
15 lines
408 B
Go
15 lines
408 B
Go
package keys
|
|
|
|
// MasterKey provides a way of securing the key used to encrypt the Tree by encrypting and decrypting said key.
|
|
type MasterKey interface {
|
|
Encrypt(dataKey []byte) error
|
|
EncryptIfNeeded(dataKey []byte) error
|
|
EncryptedDataKey() []byte
|
|
SetEncryptedDataKey([]byte)
|
|
Decrypt() ([]byte, error)
|
|
NeedsRotation() bool
|
|
ToString() string
|
|
ToMap() map[string]interface{}
|
|
TypeToIdentifier() string
|
|
}
|