i am trying to 'retrieve' passwords. I know that you don't retrieve but rather test against what's in the db. The username and password are both 'test'. However, I cannot query the db with:
select * from members where password=sha1('test');
and get anything other than an empty set.
The server is MySQL 5.0
Code:
mysql> select * from members;
+-----+-------+------------+-----------+--------+------+-----------------+-------+------------+-----------+---------+--------+
| uid | uname | first_name | last_name | cemail | plan | password | level | regdate | squestion | sanswer | active |
+-----+-------+------------+-----------+--------+------+-----------------+-------+------------+-----------+---------+--------+
| 7 | test | test | test | test | test | a94a8fe5ccb19ba | | 2008-09-20 | | | |
+-----+-------+------------+-----------+--------+------+-----------------+-------+------------+-----------+---------+--------+
1 row in set (0.00 sec)
mysql> select * from members where password=sha1('test');
max.
Empty set (0.00 sec)