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:
@@ -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")]
|
||||
|
||||
@@ -27,6 +27,7 @@ ChaCha20-Poly1305 functionality.
|
||||
|
||||
use crate::sys;
|
||||
use core::mem::MaybeUninit;
|
||||
#[cfg(feature = "aead")]
|
||||
use zeroize::{Zeroize, ZeroizeOnDrop};
|
||||
|
||||
pub struct ChaCha20Poly1305 {
|
||||
|
||||
Reference in New Issue
Block a user