
May 16th, 2005, 10:00 AM
|
|
Registered User
|
|
Join Date: Dec 2004
Posts: 17
Time spent in forums: 1 h 7 m 21 sec
Reputation Power: 0
|
|
|
Problems with Binary values
Hi,
We are using the binary form to store the passwords in our project. But we are going into some issues with the binary formats. In other words, let us say my password in binary form, happens to be '0x20161C8Z0D1641'. Say my password field length is 30. Sometimes it stores this as the given binary value for the password and some times it stores it as
'0x20161C8Z0D1641000000000000000000000000000000000 000000000000' (i.e, right pads zeroes for the complete length of the field)
With this, if my password is 'abc', when I try to validate it with the stored password, the validation passes for 'abc' as well as most of the strings that start with 'abc', like 'acbcccccc', 'abcaaa' etc.
Is there a way to avoid this problem? Would it work if I change my data type from varbinary to binary or something like that?
Thanks in advance
ourspt
|