|
1 | 1 | use inout::{InOutBuf, InOutBufReserved};
|
2 | 2 |
|
3 |
| -use crate::{Aead, Error, Payload, Result}; |
| 3 | +use crate::{Aead, Error, Result}; |
4 | 4 |
|
5 | 5 | #[cfg(feature = "alloc")]
|
6 | 6 | use alloc::vec::Vec;
|
@@ -141,14 +141,14 @@ impl<T: Aead> DynAead for T {
|
141 | 141 | #[cfg(feature = "alloc")]
|
142 | 142 | fn encrypt_to_vec(&self, nonce: &[u8], aad: &[u8], msg: &[u8]) -> Result<Vec<u8>> {
|
143 | 143 | let nonce = nonce.try_into().map_err(|_| Error)?;
|
144 |
| - let payload = Payload { aad, msg }; |
| 144 | + let payload = crate::Payload { aad, msg }; |
145 | 145 | Aead::encrypt_to_vec(self, nonce, payload)
|
146 | 146 | }
|
147 | 147 |
|
148 | 148 | #[cfg(feature = "alloc")]
|
149 | 149 | fn decrypt_to_vec(&self, nonce: &[u8], aad: &[u8], msg: &[u8]) -> Result<Vec<u8>> {
|
150 | 150 | let nonce = nonce.try_into().map_err(|_| Error)?;
|
151 |
| - let payload = Payload { aad, msg }; |
| 151 | + let payload = crate::Payload { aad, msg }; |
152 | 152 | Aead::decrypt_to_vec(self, nonce, payload)
|
153 | 153 | }
|
154 | 154 | }
|
|
0 commit comments