Open phil-k8r opened 6 years ago
Argon2::hash() accepts &[u8] as password and salt. argon2d_simple() and argon2i_simple() accept &str as password and salt and convert them to &[u8].
Argon2::hash()
&[u8]
argon2d_simple()
argon2i_simple()
&str
Instead of the conversion, argon2d_simple() and argon2i_simple() could accept types that implement AsRef<[u8]> or &[u8] directly.
AsRef<[u8]>
Argon2::hash()
accepts&[u8]
as password and salt.argon2d_simple()
andargon2i_simple()
accept&str
as password and salt and convert them to&[u8]
.Instead of the conversion,
argon2d_simple()
andargon2i_simple()
could accept types that implementAsRef<[u8]>
or&[u8]
directly.