pub struct CASScrypt;Implementations§
Source§impl CASScrypt
impl CASScrypt
Sourcepub fn hash_password_customized(
password_to_hash: String,
cpu_memory_cost: u8,
block_size: u32,
parallelism: u32,
) -> CasResult<String>
pub fn hash_password_customized( password_to_hash: String, cpu_memory_cost: u8, block_size: u32, parallelism: u32, ) -> CasResult<String>
Hashes a passwith using Scrypt with custom params. Parameters:
- password_to_hash: The password to be hashed.
- cpu_memory_cost: log₂ of the Scrypt parameter
N, the work factor. - block_size:
rparameter: resource usage. - parallelism:
pparameter: parallelization.
Sourcepub fn hash_password(password_to_hash: String) -> CasResult<String>
pub fn hash_password(password_to_hash: String) -> CasResult<String>
Hashes a password using Scrypt. Returns the hashed password as a string.
Auto Trait Implementations§
impl Freeze for CASScrypt
impl RefUnwindSafe for CASScrypt
impl Send for CASScrypt
impl Sync for CASScrypt
impl Unpin for CASScrypt
impl UnsafeUnpin for CASScrypt
impl UnwindSafe for CASScrypt
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