1
0
mirror of https://github.com/getsops/sops.git synced 2026-02-05 12:45:21 +01:00

Move MasterKey to separate package to avoid import cycles

This commit is contained in:
Adrian Utrilla
2017-08-17 08:52:00 -07:00
parent 6e4dfdec09
commit 745a0631ba
4 changed files with 35 additions and 31 deletions

11
keys/keys.go Normal file
View File

@@ -0,0 +1,11 @@
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
Decrypt() ([]byte, error)
NeedsRotation() bool
ToString() string
ToMap() map[string]interface{}
}