diff options
author | 3dB <3db@3decibels.net> | 2009-07-23 17:49:36 -0400 |
---|---|---|
committer | 3dB <3db@3decibels.net> | 2009-07-23 17:49:36 -0400 |
commit | 54e93c0f6b1ef23516d7c7ba88efaa601e7318cc (patch) | |
tree | aceaa5b061c65c301a2bd2ef1ba1a7b68cddf688 /lib/VNDB/Util | |
parent | a130a4f79e04f8a6ccd4514b9a1d0285c63edfea (diff) |
Created subroutine to genrate password salts
This is more of a test of the new git environment than anything else.
Diffstat (limited to 'lib/VNDB/Util')
-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; |