470,596 Members | 1,529 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,596 developers. It's quick & easy.

How to Store 3DES encrypted String in MySQL column

plz tell me how to store a string encrypted by 3DES algorithm.i want to store password column to be stored by using this algorithm.
Thanks.
Feb 22 '08 #1
1 3929
ronverdonk
4,258 Expert 4TB
When you use the mcrypt_encrypt command to encrypt, you know that the returned crypttext string can be larger that the size of the data that is encrypted.
So your MySQL table column must be large enough to hold the largest.

Since it is a password, it will probably no longer than 24 chars.

To be on the safe side, it does not hurt to make the table column a VARCHAR with enough chars to contain your crypt result.

Ronald
Feb 22 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

6 posts views Thread by Ian Davies | last post: by
reply views Thread by Nobody | last post: by
3 posts views Thread by tshad | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.