diff options
-rw-r--r-- | lib/VNDB/Util/Auth.pm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/VNDB/Util/Auth.pm b/lib/VNDB/Util/Auth.pm index cb0751e9..413a8013 100644 --- a/lib/VNDB/Util/Auth.pm +++ b/lib/VNDB/Util/Auth.pm @@ -10,6 +10,7 @@ use strict; use warnings; use Exporter 'import'; use Digest::MD5 'md5_hex'; +use Digest::SHA; use Crypt::Lite; @@ -92,5 +93,15 @@ sub _authCheck { } +# Generates a 9 character salt +# Returns salt as a string +sub _generateSalt { + my $s; + for ($i = 0; $i < 9; $i++) { + $s .= chr(rand(93) + 33); + } + return $s; +} + 1; |