pub struct ValidationConfig {
pub max_key_size: usize,
pub max_nonce_size: usize,
pub max_plaintext_size: usize,
pub max_ciphertext_size: usize,
pub max_associated_data_size: usize,
pub strict: bool,
pub validate_key_entropy: bool,
pub validate_nonce_uniqueness: bool,
}Expand description
Input validation configuration
Fields§
§max_key_size: usizeMaximum key size in bytes
max_nonce_size: usizeMaximum nonce size in bytes
max_plaintext_size: usizeMaximum plaintext size in bytes
max_ciphertext_size: usizeMaximum ciphertext size in bytes
max_associated_data_size: usizeMaximum associated data size in bytes
strict: boolEnable strict validation (reject potentially dangerous inputs)
validate_key_entropy: boolEnable entropy validation for keys
validate_nonce_uniqueness: boolEnable nonce uniqueness validation
Implementations§
Source§impl ValidationConfig
impl ValidationConfig
Sourcepub fn permissive() -> Self
pub fn permissive() -> Self
Create a permissive validation configuration
Trait Implementations§
Source§impl Clone for ValidationConfig
impl Clone for ValidationConfig
Source§fn clone(&self) -> ValidationConfig
fn clone(&self) -> ValidationConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ValidationConfig
impl Debug for ValidationConfig
Source§impl Default for ValidationConfig
impl Default for ValidationConfig
Source§impl PartialEq for ValidationConfig
impl PartialEq for ValidationConfig
Source§fn eq(&self, other: &ValidationConfig) -> bool
fn eq(&self, other: &ValidationConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for ValidationConfig
impl Eq for ValidationConfig
impl StructuralPartialEq for ValidationConfig
Auto Trait Implementations§
impl Freeze for ValidationConfig
impl RefUnwindSafe for ValidationConfig
impl Send for ValidationConfig
impl Sync for ValidationConfig
impl Unpin for ValidationConfig
impl UnsafeUnpin for ValidationConfig
impl UnwindSafe for ValidationConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more