From 35e76482263eb0fd989aecca2adb109715b3529f Mon Sep 17 00:00:00 2001 From: ngoomie Date: Mon, 19 Aug 2024 21:37:54 -0600 Subject: [PATCH] Move CharmBoard::Model::Crypt into CharmBoard::Util namespace --- lib/CharmBoard/Controller/Login.pm | 4 ++-- lib/CharmBoard/Controller/Register.pm | 2 +- lib/CharmBoard/{Model => Util}/Crypt/Password.pm | 10 +++++----- lib/CharmBoard/{Model => Util}/Crypt/Seasoning.pm | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) rename lib/CharmBoard/{Model => Util}/Crypt/Password.pm (87%) rename lib/CharmBoard/{Model => Util}/Crypt/Seasoning.pm (92%) diff --git a/lib/CharmBoard/Controller/Login.pm b/lib/CharmBoard/Controller/Login.pm index 63d1b66..c31226b 100644 --- a/lib/CharmBoard/Controller/Login.pm +++ b/lib/CharmBoard/Controller/Login.pm @@ -7,8 +7,8 @@ use experimental qw(try); use feature ':5.20'; use Mojo::Base 'Mojolicious::Controller', -signatures; -use CharmBoard::Model::Crypt::Password; -use CharmBoard::Model::Crypt::Seasoning; +use CharmBoard::Util::Crypt::Password; +use CharmBoard::Util::Crypt::Seasoning; sub login { my $self = shift; diff --git a/lib/CharmBoard/Controller/Register.pm b/lib/CharmBoard/Controller/Register.pm index 195352a..1591636 100644 --- a/lib/CharmBoard/Controller/Register.pm +++ b/lib/CharmBoard/Controller/Register.pm @@ -7,7 +7,7 @@ use experimental qw(try); use feature ':5.20'; use Mojo::Base 'Mojolicious::Controller', -signatures; -use CharmBoard::Model::Crypt::Password; +use CharmBoard::Util::Crypt::Password; # initial registration page sub register { diff --git a/lib/CharmBoard/Model/Crypt/Password.pm b/lib/CharmBoard/Util/Crypt/Password.pm similarity index 87% rename from lib/CharmBoard/Model/Crypt/Password.pm rename to lib/CharmBoard/Util/Crypt/Password.pm index 8ca80c4..dc5b3b8 100644 --- a/lib/CharmBoard/Model/Crypt/Password.pm +++ b/lib/CharmBoard/Util/Crypt/Password.pm @@ -1,4 +1,4 @@ -package CharmBoard::Model::Crypt::Password; +package CharmBoard::Util::Crypt::Password; use utf8; use strict; @@ -7,7 +7,7 @@ use experimental qw(try); use feature ':5.20'; use Authen::Passphrase::Argon2; -use CharmBoard::Model::Crypt::Seasoning; +use CharmBoard::Util::Crypt::Seasoning; use Exporter qw(import); our @EXPORT = qw(passgen passchk); @@ -43,16 +43,16 @@ sub passchk { __END__ =pod =head1 NAME -CharmBoard::Model::Crypt::Password - password processing module +CharmBoard::Util::Crypt::Password - password processing module =head1 SYNOPSIS =begin perl -use CharmBoard::Model::Crypt::Password; +use CharmBoard::Util::Crypt::Password; ($salt, $hash) = passgen($plaintextPassword); $passwordVerification = passchk($salt, $hash, $plaintextPassword) =end perl =head1 DESCRIPTION -CharmBoard::Model::Crypt::Password processes passwords, either processing +CharmBoard::Util::Crypt::Password processes passwords, either processing new passwords for database storage, or checking passwords entered when logging in to make sure they're correct. diff --git a/lib/CharmBoard/Model/Crypt/Seasoning.pm b/lib/CharmBoard/Util/Crypt/Seasoning.pm similarity index 92% rename from lib/CharmBoard/Model/Crypt/Seasoning.pm rename to lib/CharmBoard/Util/Crypt/Seasoning.pm index 20965e2..c344535 100644 --- a/lib/CharmBoard/Model/Crypt/Seasoning.pm +++ b/lib/CharmBoard/Util/Crypt/Seasoning.pm @@ -1,4 +1,4 @@ -package CharmBoard::Model::Crypt::Seasoning; +package CharmBoard::Util::Crypt::Seasoning; use utf8; use strict;