pub struct SecretBytes(/* private fields */);Expand description
Zeroizing byte-oriented secret material.
Implementations§
Source§impl SecretBytes
impl SecretBytes
Sourcepub fn from_slice(secret: &[u8]) -> Self
pub fn from_slice(secret: &[u8]) -> Self
Copies borrowed secret bytes into zeroizing storage.
Sourcepub fn expose_secret(&self) -> &[u8] ⓘ
pub fn expose_secret(&self) -> &[u8] ⓘ
Returns the secret bytes.
Trait Implementations§
Source§impl AsRef<[u8]> for SecretBytes
impl AsRef<[u8]> for SecretBytes
Source§impl Clone for SecretBytes
impl Clone for SecretBytes
Source§fn clone(&self) -> SecretBytes
fn clone(&self) -> SecretBytes
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 SecretBytes
impl Debug for SecretBytes
Source§impl<'de> Deserialize<'de> for SecretBytes
impl<'de> Deserialize<'de> for SecretBytes
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Drop for SecretBytes
impl Drop for SecretBytes
impl Eq for SecretBytes
Source§impl PartialEq for SecretBytes
impl PartialEq for SecretBytes
Source§fn eq(&self, other: &SecretBytes) -> bool
fn eq(&self, other: &SecretBytes) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SecretBytes
Auto Trait Implementations§
impl Freeze for SecretBytes
impl RefUnwindSafe for SecretBytes
impl Send for SecretBytes
impl Sync for SecretBytes
impl Unpin for SecretBytes
impl UnsafeUnpin for SecretBytes
impl UnwindSafe for SecretBytes
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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)