pub struct SecretVec { /* private fields */ }
Expand description
Variable-size secret vector that guarantees zeroization
This type provides:
- Automatic zeroization on drop
- Secure cloning that preserves security properties
- Dynamic sizing with secure memory management
Implementations§
Source§impl SecretVec
impl SecretVec
Sourcepub fn from_slice(slice: &[u8]) -> SecretVec
pub fn from_slice(slice: &[u8]) -> SecretVec
Create a secret vector from a slice
Sourcepub fn with_capacity(capacity: usize) -> SecretVec
pub fn with_capacity(capacity: usize) -> SecretVec
Create a secret vector with the specified capacity
Sourcepub fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
pub fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
Get a mutable reference to the inner data
Sourcepub fn extend_from_slice(&mut self, slice: &[u8])
pub fn extend_from_slice(&mut self, slice: &[u8])
Extend the vector with additional data
Trait Implementations§
Source§impl SecureZeroingType for SecretVec
impl SecureZeroingType for SecretVec
Auto Trait Implementations§
impl Freeze for SecretVec
impl RefUnwindSafe for SecretVec
impl Send for SecretVec
impl Sync for SecretVec
impl Unpin for SecretVec
impl UnwindSafe for SecretVec
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<T> ConstantTimeEquals for T
impl<T> ConstantTimeEquals for T
Source§impl<T> ToHex for T
impl<T> ToHex for T
Source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Lower case
letters are used (e.g. f9b4ca
)Source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Upper case
letters are used (e.g. F9B4CA
)