summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormrw1593 <botahamec@outlook.com>2023-05-14 10:31:48 -0400
committermrw1593 <botahamec@outlook.com>2023-05-29 10:46:00 -0400
commitad6faa37ff59a01f6834e0c9141d84e24b81d509 (patch)
treea371f7a2da8a2887278c3ec178b5206dfa56a069
parentff389fe18b3eb9eef54c69f201d96e940eb82a23 (diff)
Add an example for the config function
-rw-r--r--src/services/crypto.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/services/crypto.rs b/src/services/crypto.rs
index 7ad2ce0..9c36c57 100644
--- a/src/services/crypto.rs
+++ b/src/services/crypto.rs
@@ -6,6 +6,15 @@ use exun::RawUnexpected;
use crate::services::secrets::pepper;
/// The configuration used for hashing and verifying passwords
+///
+/// # Example
+///
+/// ```
+/// use crate::services::secrets;
+///
+/// let pepper = secrets::pepper();
+/// let config = config(&pepper);
+/// ```
fn config<'a>(pepper: &'a [u8]) -> argon2::Config<'a> {
argon2::Config {
hash_length: 32,