(value interface{}, key []byte, path string)
| 26 | } |
| 27 | |
| 28 | func (c reverseCipher) Encrypt(value interface{}, key []byte, path string) (string, error) { |
| 29 | b, err := ToBytes(value) |
| 30 | if err != nil { |
| 31 | return "", err |
| 32 | } |
| 33 | return reverse(string(b)), nil |
| 34 | } |
| 35 | func (c reverseCipher) Decrypt(value string, key []byte, path string) (plaintext interface{}, err error) { |
| 36 | if value == "error" { |
| 37 | return nil, fmt.Errorf("Error") |