Sunday, April 24, 2011

Getting A Pa Trailer License For Boat

Encrypt password with MySQL





who did not have to encrypt a password before storing in the database? As you may know is a good practice to save the encrypted password as this can minimize the damage to our users if an intruder obtains the way to see the base and also allows system administrators are not aware of them, no way to know them.

When working with MySQL , we can use functions or md5 sha1 . For testing we can do it this way: > select md5 ('Holass');

> select sha1 ('Holass');
Recall that the encryption algorithms and md5 sha1


are the most used.

To insert a user with a password encrypted using md5
can do the following: > insert into user (name, password) values \u200b\u200b('name', md5 ('password')); and if we verify the user: > select * from users WHERE name = 'name' and password = md5 ('password'); MySQL

also brings its own function to encrypt password
called Books:

> select password ('Holass');




leave links:

http://dev.mysql.com/doc/refman/5.1/en/password-hashing.html

http://dev.mysql.com/doc/refman/5.0/es/encryption-functions.html

0 comments:

Post a Comment