Struct mini_functions::hash::algorithms::argon2i::Argon2i
source · pub struct Argon2i;
Expand description
Implementation of the Argon2i hashing algorithm.
Argon2i
is a struct that represents the Argon2i hashing algorithm,
which is a memory-hard algorithm resistant to GPU-based attacks and side-channel attacks.
It is one of the multiple hashing algorithms that can be used for password hashing in this library.
This struct implements the HashingAlgorithm
trait, providing a concrete implementation
for hashing passwords using the Argon2i algorithm.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Argon2i
impl<'de> Deserialize<'de> for Argon2i
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<Argon2i, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Argon2i, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl HashingAlgorithm for Argon2i
impl HashingAlgorithm for Argon2i
source§fn hash_password(password: &str, salt: &str) -> Result<Vec<u8>, String>
fn hash_password(password: &str, salt: &str) -> Result<Vec<u8>, String>
Hashes a given password using the Argon2i algorithm.
This method computes a hashed representation of the plaintext password
using the Argon2i algorithm,
combined with the provided salt
for added security.
Parameters
password
: The plaintext password to be hashed.salt
: A cryptographic salt to prevent rainbow table attacks.
Returns
Returns a Result
with Ok
, containing the hashed password as a vector of bytes.
Currently, this function does not handle hashing errors and will always return Ok
.
source§impl Ord for Argon2i
impl Ord for Argon2i
source§impl PartialEq for Argon2i
impl PartialEq for Argon2i
source§impl PartialOrd for Argon2i
impl PartialOrd for Argon2i
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more