Please see my questions below - I asked the PHP list and no-one responded. Basically I'm new to "mcrypt" and I'm trying to use mcrypt and PHP with MySQL - I'd like to encrypt a 20-character field and store the result in a MySQL column, but I'm not sure 1. what data type to make the column - varchar? 2. how big to make the column I'm testing using Triple DES encryption, and the resulting string contains all kinds of strange characters - I'm able to store the field using the PHP add_slashes function to escape a few special characters, but in the "mysql" client when I query the row containing the encrypted field, mysql displays a bunch of strange characters - I can refer to the row by the non-encrypted key although the same key does *NOT* display properly in mysql(the encrypted column must be screwing up the displayi). Anyone have any ideas how to help? TIA. -- Hardy Merrill Mission Critical Linux, Inc. http://www.missioncriticallinux.com ----- Forwarded message from Hardy Merrill <[EMAIL PROTECTED]> ----- > Date: Mon, 26 Feb 2001 10:49:37 -0500 > From: Hardy Merrill <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: [PHP] mcrypt and encrypted field length > > First, can anyone point me to a good "mcrypt" primer or tutorial? > > Second, how can I determine what type and length I should make a > database field that will hold encrypted data? Is there some table > somewhere which tells how long a resulting encrypted field will be > based on the encryption type and/or length of the plaintext field? > > Example: If I have a 20 character field and want to use Triple > DES to encrypt it, can I find out how long the resulting > field will be - what is the longest it will be? Will > the resulting encrypted field always be the same length? > Should I make the data type some variation of "text" or > "varchar"? > > TIA. > > -- > Hardy Merrill > Mission Critical Linux, Inc. > http://www.missioncriticallinux.com > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] ----- End forwarded message ----- --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php