diff --git a/src/utils/crypto.go b/src/utils/crypto.go index 8c83d946..c09d65d7 100644 --- a/src/utils/crypto.go +++ b/src/utils/crypto.go @@ -1,6 +1,3 @@ -//go:build encrypted -// +build encrypted - package utils import ( diff --git a/src/utils/crypto_noop.go b/src/utils/crypto_noop.go deleted file mode 100644 index 95c8adca..00000000 --- a/src/utils/crypto_noop.go +++ /dev/null @@ -1,24 +0,0 @@ -//go:build !encrypted -// +build !encrypted - -package utils - -import ( - "bytes" - "fmt" -) - -// GetEncryptionKeys returns list of encryption keys from ENCRYPTION_KEYS env variable name or default value -func GetEncryptionKeys() ([]string, error) { - return nil, fmt.Errorf("encryption not supported") -} - -// IsEncrypted returns true if cfg encrypted with age tool (https://github.com/FiloSottile/age) -func IsEncrypted(cfg []byte) bool { - return bytes.Contains(cfg, []byte(`age-encryption`)) -} - -// Decrypt decrypts config using EncryptionKeys -func Decrypt(cfg []byte) ([]byte, bool, error) { - return nil, false, fmt.Errorf("encryption not supported") -}