From 17a0de060219e04ffe9b75e014c74eda6212e8fb Mon Sep 17 00:00:00 2001 From: Andreas Grois Date: Wed, 12 Oct 2022 23:11:00 +0200 Subject: Minor: rename a function to better match the names of similar functions. --- src/passwordmaker/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/passwordmaker/mod.rs b/src/passwordmaker/mod.rs index 8fd4f30..a96698d 100644 --- a/src/passwordmaker/mod.rs +++ b/src/passwordmaker/mod.rs @@ -242,7 +242,7 @@ pub(super) struct PasswordPartParameters<'a>{ impl<'a> PasswordPartParameters<'a>{ pub(super) fn from_public_parameters(hash_algorithm : super::HashAlgorithm, leet : super::UseLeetWhenGenerating, characters : &'a str) -> Self { use super::UseLeetWhenGenerating; - let hash_algorithm = AlgoSelection::from_settings_algorithm(hash_algorithm); + let hash_algorithm = AlgoSelection::from_public_parameters(hash_algorithm); PasswordPartParameters{ characters: match &hash_algorithm { AlgoSelection::V06(_) => Grapheme::iter_from_str("0123456789abcdef").collect(), @@ -283,7 +283,7 @@ enum AlgoSelection{ } impl AlgoSelection { - fn from_settings_algorithm(settings_algorithm : super::HashAlgorithm) -> Self { + fn from_public_parameters(settings_algorithm : super::HashAlgorithm) -> Self { use super::HashAlgorithm; match settings_algorithm { HashAlgorithm::Md5Version06 => AlgoSelection::V06(V06HmacOrNot::NonHmac), -- cgit v1.2.3