[−][src]Struct password_hash::SaltString
Owned stack-allocated equivalent of Salt
.
Implementations
impl SaltString
[src]
pub fn new(s: &str) -> Result<Self, ParseError>
[src]
Create a new SaltString
.
pub fn b64_encode(input: &[u8]) -> Result<Self, B64Error>
[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], B64Error>
[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 AsRef<str> 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 Debug for SaltString
[src]
impl Default for SaltString
[src]
fn default() -> SaltString
[src]
impl Eq for SaltString
[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 StructuralEq for SaltString
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,