You are here: AES_ENCRYPT() / AES_DECRYPT() question « PHP Programming Language « IT news, forums, messages
AES_ENCRYPT() / AES_DECRYPT() question

Posted by Marcus on 03/14/06 07:53

Hello,

I have been storing passwords in my database via AES_ENCRYPT and using
AES_DECRYPT if I need to retrieve them in readable form. For the most
part everything works fine, but I noticed that a few entries when
returned using AES_DECRYPT register as NULL.

The column in question is of type TINYBLOB, and has a NOT NULL
constraint. Passwords are all between 6 and 10 characters in length.
When I searched the net for similar problems, most other people reported
using some sort of TEXT type, and I am aware of the problem with TEXT
types and uneven padding, but I don't think that is my problem here
since I am using a TINYBLOB.

So here are my questions...

1) Is TINYBLOB too small for some reason, and should I instead use BLOB?
I would rather save disk space if possible using TINYBLOB especially
since the max an entry can be is 10 characters, and the great majority
of my rows are correct, but I haven't been able to rule out this as the
problem

2) How can these fields be NULL if I have a NOT NULL constraint, is it
because the DB is looking at the TINYBLOB object and treating that as
something that is NOT NULL?

3) If I do need to change the column type to BLOB, will my current
TINYBLOBs transfer fine via a simple alter table ... modify column ...
query or will there be some padding issues?

Thanks a bunch in advance for all your help.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация