crypto/aead.rs
1// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
2// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
3// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
4// option. This file may not be copied, modified, or distributed
5// except according to those terms.
6
7pub trait AeadEncryptor {
8
9 fn encrypt(&mut self, input: &[u8], output: &mut [u8], tag: &mut [u8]);
10}
11
12pub trait AeadDecryptor {
13
14 fn decrypt(&mut self, input: &[u8], output: &mut [u8], tag: &[u8]) -> bool;
15}