pub enum EncryptionOptions {
None,
AES_GCM {
nonce: Vec<u8>,
},
}Expand description
Options to be passed in while performing an encryption operation, if required by the algorithm.
Variants§
None
No options are required. Most algorithms do not require additional parameters
AES_GCM
Options for AES GCM encryption.
Fields
§
nonce: Vec<u8>Initialization vector, or nonce for the AES GCM encryption. MUST BE 96 bits long.
AES GCM encryption operations should not reuse the nonce, or initialization vector. Users should keep track of previously used nonces and not reuse them. A simple way to keep track is to simply increment the nonce as a 96 bit counter.
Implementations§
Source§impl EncryptionOptions
impl EncryptionOptions
Sourcepub fn description(&self) -> &'static str
pub fn description(&self) -> &'static str
Description of the type of key
Trait Implementations§
Source§impl Clone for EncryptionOptions
impl Clone for EncryptionOptions
Source§fn clone(&self) -> EncryptionOptions
fn clone(&self) -> EncryptionOptions
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 EncryptionOptions
impl Debug for EncryptionOptions
Source§impl Default for EncryptionOptions
impl Default for EncryptionOptions
Source§fn default() -> EncryptionOptions
fn default() -> EncryptionOptions
Returns the “default value” for a type. Read more
Source§impl Display for EncryptionOptions
impl Display for EncryptionOptions
impl Eq for EncryptionOptions
Source§impl PartialEq for EncryptionOptions
impl PartialEq for EncryptionOptions
Source§fn eq(&self, other: &EncryptionOptions) -> bool
fn eq(&self, other: &EncryptionOptions) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for EncryptionOptions
Auto Trait Implementations§
impl Freeze for EncryptionOptions
impl RefUnwindSafe for EncryptionOptions
impl Send for EncryptionOptions
impl Sync for EncryptionOptions
impl Unpin for EncryptionOptions
impl UnsafeUnpin for EncryptionOptions
impl UnwindSafe for EncryptionOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.
Source§impl<T> ValidateIp for Twhere
T: ToString,
impl<T> ValidateIp for Twhere
T: ToString,
Source§fn validate_ipv4(&self) -> bool
fn validate_ipv4(&self) -> bool
Validates whether the given string is an IP V4
Source§fn validate_ipv6(&self) -> bool
fn validate_ipv6(&self) -> bool
Validates whether the given string is an IP V6
Source§fn validate_ip(&self) -> bool
fn validate_ip(&self) -> bool
Validates whether the given string is an IP