Service defines the encryption interface
| 14 | |
| 15 | // Service defines the encryption interface |
| 16 | type Service interface { |
| 17 | Encrypt(plaintext string) (string, error) |
| 18 | Decrypt(ciphertext string) (string, error) |
| 19 | Hash(plaintext string) string |
| 20 | } |
| 21 | |
| 22 | // NewService creates encryption service |
| 23 | func NewService(encryptionKey string) (Service, error) { |
no outgoing calls
no test coverage detected