Algorithm implementations encrypt and decrypt data.
| 11 | |
| 12 | // Algorithm implementations encrypt and decrypt data. |
| 13 | type Algorithm interface { |
| 14 | Encrypt(key []byte, data []byte) ([]byte, error) |
| 15 | Decrypt(key []byte, ciphertext []byte) ([]byte, error) |
| 16 | NeedsKey() bool |
| 17 | } |
| 18 | |
| 19 | // Register adds a value to the store of all algorithms |
| 20 | func Register(name string, a Algorithm) error { |
no outgoing calls
no test coverage detected