pub struct Hash { /* private fields */ }Implementations§
Methods from Deref<Target = Argon2<'static>>§
Sourcepub fn hash_password_into(
&self,
pwd: &[u8],
salt: &[u8],
out: &mut [u8],
) -> Result<(), Error>
pub fn hash_password_into( &self, pwd: &[u8], salt: &[u8], out: &mut [u8], ) -> Result<(), Error>
Hash a password and associated parameters into the provided output buffer.
Sourcepub fn hash_password_into_with_memory(
&self,
pwd: &[u8],
salt: &[u8],
out: &mut [u8],
memory_blocks: impl AsMut<[Block]>,
) -> Result<(), Error>
pub fn hash_password_into_with_memory( &self, pwd: &[u8], salt: &[u8], out: &mut [u8], memory_blocks: impl AsMut<[Block]>, ) -> Result<(), Error>
Hash a password and associated parameters into the provided output buffer.
This method takes an explicit memory_blocks parameter which allows
the caller to provide the backing storage for the algorithm’s state:
- Users with the
allocfeature enabled can useArgon2::hash_password_intoto have it allocated for them. no_stdusers on “heapless” targets can use an array of theBlocktype to stack allocate this buffer.
Sourcepub fn fill_memory(
&self,
pwd: &[u8],
salt: &[u8],
memory_blocks: impl AsMut<[Block]>,
) -> Result<(), Error>
pub fn fill_memory( &self, pwd: &[u8], salt: &[u8], memory_blocks: impl AsMut<[Block]>, ) -> Result<(), Error>
Use a password and associated parameters only to fill the given memory blocks.
This method omits the calculation of a hash and can be used when only the filled memory is required. It is not necessary to call this method before calling any of the hashing functions.
Trait Implementations§
Source§impl InstanceTrait for Hash
impl InstanceTrait for Hash
type Error = Error
fn register<'life0, 'async_trait>(
_: &'life0 Container,
) -> Pin<Box<dyn Future<Output = Result<Self, ContainerError>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
'life0: 'async_trait,
fn name() -> String
fn boot<'async_trait>() -> Pin<Box<dyn Future<Output = Result<(), ContainerError>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
fn cleanup() -> Result<(), ContainerError>
fn facade() -> &'static Selfwhere
Self: Sized,
Auto Trait Implementations§
impl Freeze for Hash
impl RefUnwindSafe for Hash
impl Send for Hash
impl Sync for Hash
impl Unpin for Hash
impl UnwindSafe for Hash
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