Struct password_hash::SaltString [−][src]
pub struct SaltString { /* fields omitted */ }Owned stack-allocated equivalent of Salt.
Implementations
impl SaltString[src]
impl SaltString[src]pub fn generate(rng: impl CryptoRng + RngCore) -> Self[src]
Generate a random B64-encoded SaltString.
pub fn new(s: &str) -> Result<Self>[src]
Create a new SaltString.
pub fn b64_encode(input: &[u8]) -> Result<Self>[src]
Encode the given byte slice as B64 into a new SaltString.
Returns None if the slice is too long.
pub fn b64_decode<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8]>[src]
Decode this SaltString from B64 into the provided output buffer.
pub fn as_salt(&self) -> Salt<'_>[src]
Borrow the contents of a SaltString as a Salt.
pub fn as_str(&self) -> &str[src]
Borrow the contents of a SaltString as a str.
pub fn as_bytes(&self) -> &[u8][src]
Borrow this value as bytes.
pub fn len(&self) -> usize[src]
Get the length of this value in ASCII characters.
Trait Implementations
impl Clone for SaltString[src]
impl Clone for SaltString[src]fn clone(&self) -> SaltString[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Eq for SaltString[src]
impl Eq for SaltString[src]impl<'a> From<&'a SaltString> for Salt<'a>[src]
impl<'a> From<&'a SaltString> for Salt<'a>[src]fn from(salt_string: &'a SaltString) -> Salt<'a>[src]
impl PartialEq<SaltString> for SaltString[src]
impl PartialEq<SaltString> for SaltString[src]impl StructuralEq for SaltString[src]
impl StructuralEq for SaltString[src]Auto Trait Implementations
impl RefUnwindSafe for SaltString
impl RefUnwindSafe for SaltStringimpl Send for SaltString
impl Send for SaltStringimpl Sync for SaltString
impl Sync for SaltStringimpl Unpin for SaltString
impl Unpin for SaltStringimpl UnwindSafe for SaltString
impl UnwindSafe for SaltString