in reply to How to Encrypt Authentication and Data to DB?

First of all, seriously consider using LDAP (a.k.a. Microsoft OpenDirectory) instead.   This is probably the most widely used strategy for centralized management of authentication and authorization throughout an enterprise, and its use generally requires the construction of no software at all.   There are plenty of administrative consoles out there which a security department can easily use to manage this information across all systems, and there is nothing to invent nor particularly to write.

Secondly, it is most common to store one-way-hashed values (SHA1 is recommended today over MD5) in any database store.   These functions produce a “digital signature” which is extremely sensitive to changes but which cannot be reversed.   Hashed values, not plaintext, are the only thing sent across the wire (which should nonetheless be an encrypted, e.g. VPN, connection).

Replies are listed 'Best First'.
Re^2: How to Encrypt Authentication and Data to DB?
by stonecolddevin (Parson) on Jan 28, 2015 at 23:13 UTC

    (SHA1 is recommended today over MD5)

    Use Crypt::Eksblowfish::Bcrypt if you're doing any sort of encryption like this.

    I mean, MD5 shouldn't even be mentioned in encryption context.

    Three thousand years of beautiful tradition, from Moses to Sandy Koufax, you're god damn right I'm living in the fucking past