pub struct InputValidator { /* private fields */ }Expand description
Input validator
Implementations§
Source§impl InputValidator
impl InputValidator
Sourcepub fn with_config(config: ValidationConfig) -> Self
pub fn with_config(config: ValidationConfig) -> Self
Create a new input validator with custom configuration
Sourcepub fn validate_key(&self, key: &[u8]) -> Result<()>
pub fn validate_key(&self, key: &[u8]) -> Result<()>
Validate a key
Sourcepub fn validate_nonce(&self, nonce: &[u8]) -> Result<()>
pub fn validate_nonce(&self, nonce: &[u8]) -> Result<()>
Validate a nonce
Sourcepub fn validate_plaintext(&self, plaintext: &[u8]) -> Result<()>
pub fn validate_plaintext(&self, plaintext: &[u8]) -> Result<()>
Validate plaintext
Sourcepub fn validate_ciphertext(&self, ciphertext: &[u8]) -> Result<()>
pub fn validate_ciphertext(&self, ciphertext: &[u8]) -> Result<()>
Validate ciphertext
Sourcepub fn validate_associated_data(&self, associated_data: &[u8]) -> Result<()>
pub fn validate_associated_data(&self, associated_data: &[u8]) -> Result<()>
Validate associated data
Trait Implementations§
Source§impl Clone for InputValidator
impl Clone for InputValidator
Source§fn clone(&self) -> InputValidator
fn clone(&self) -> InputValidator
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 moreAuto Trait Implementations§
impl Freeze for InputValidator
impl RefUnwindSafe for InputValidator
impl Send for InputValidator
impl Sync for InputValidator
impl Unpin for InputValidator
impl UnsafeUnpin for InputValidator
impl UnwindSafe for InputValidator
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