in reply to Re: Integrating Password encryption into DBIx::UserDB
in thread Integrating Password encryption into DBIx::UserDB

OK. The POD looks interesting. I'm assuming I only need to use:
use Digest::SHA; my $pw = Digest::SHA::sha256($password); my $pwc = Digest::SHA::sha256($passwordconfirm);
Then use the digests as I would have used a plain text password. My only question here is, how large do my password fields need to be to accomodate a sha-256 hashed digest? What data types will allow all possible characters in the digest?

-- Hugh

Replies are listed 'Best First'.
Re^3: Integrating Password encryption into DBIx::UserDB
by tirwhan (Abbot) on Feb 01, 2006 at 12:33 UTC

    Yep, that's it. You can use the sha256_hex or sha256_base64 methods to encode the hash in a format that's easily storeable in the database.


    There are ten types of people: those that understand binary and those that don't.
      For the sake of my alter table query, how many characters do these digests turn out to be? Will a varchar(255) handle the result? Or do I need a text field? -- Hugh