(value interface{}, key []byte, path string)
| 42 | type encPrefixCipher struct{} |
| 43 | |
| 44 | func (c encPrefixCipher) Encrypt(value interface{}, key []byte, path string) (string, error) { |
| 45 | b, err := ToBytes(value) |
| 46 | if err != nil { |
| 47 | return "", err |
| 48 | } |
| 49 | return "ENC:" + string(b), nil |
| 50 | } |
| 51 | func (c encPrefixCipher) Decrypt(value string, key []byte, path string) (plaintext interface{}, err error) { |
| 52 | v, ok := strings.CutPrefix(value, "ENC:") |
| 53 | if !ok { |