1
0
mirror of https://github.com/wolfSSL/wolfssl.git synced 2026-10-24 04:09:07 +03:00

rust: gate zeroize and aead imports on the algorithms that use them

This commit is contained in:
Reda Chouk
2026-10-13 14:06:52 +02:00
parent c3a986bb33
commit d89136ec9b
2 changed files with 5 additions and 3 deletions

View File

@@ -27,15 +27,16 @@ Encryption Standard (AES) functionality.
use crate::sys;
use core::mem::MaybeUninit;
#[cfg(all(feature = "aead", any(aes_ccm, aes_gcm)))]
use zeroize::{Zeroize, ZeroizeOnDrop};
#[cfg(feature = "aead")]
#[cfg(all(feature = "aead", any(aes_ccm, aes_gcm)))]
use aead::{AeadCore, AeadInPlace, KeyInit, KeySizeUser};
#[cfg(feature = "aead")]
#[cfg(all(feature = "aead", any(aes_ccm, aes_gcm)))]
use aead::generic_array::typenum::{U0, U12, U16, U24, U32};
#[cfg(all(feature = "cipher", not(feature = "aead")))]
#[cfg(all(feature = "cipher", not(all(feature = "aead", any(aes_ccm, aes_gcm)))))]
use cipher::typenum::consts::{U16, U24, U32};
#[cfg(feature = "cipher")]

View File

@@ -27,6 +27,7 @@ ChaCha20-Poly1305 functionality.
use crate::sys;
use core::mem::MaybeUninit;
#[cfg(feature = "aead")]
use zeroize::{Zeroize, ZeroizeOnDrop};
pub struct ChaCha20Poly1305 {