05.08.2012, 12:20
(
Последний раз редактировалось FireCat; 11.11.2012 в 17:47.
)
Introduction
Hey guys!
If you're going to comment this tutorial as "SUX" and stuff like that, don't even bother commenting and press the 'report' button.
If you're going to read the whole tutorial, and comment "Nice!", its much appreciated!
Script
If you're using the BlueG's MySQL plugin, you don't need to use the whirlpool plugin. (I said you don't need, but go a head if you want to..)
Theres another hashing system called "sha-1".
There are various types of sha, but I'm just going to explain sha-1.
Personally, I think sha1 is very good (of what I read).
Its secure, and good.
sha-1 is not breakable.
sha1 appeared in 1995 and it stands for secure hash algorithm.
There are 4 sha's (if I'm not mistaken) sha-0, sha-1, sha-2 and sha-3.
Ok, ok enough, lets go to the scripting.
When we want to use it while calling a query in MySQL, we simply do:
sha1('textparam[]')
Quite easy right?
No need to load any extra plugins, nor loading more natives.
I'm not sure if the lenght of the hashes vary or not, but I think not.
I'm pretty sure it doesnt, from the hashes of my users...
For example, if we want to use it on our daily register/login system, it would look like something like this:
mysql_query("INSERT INTO `TABLENAME` (HASHTEST) VALUES (sha1('firecatrocks'))");
So we are INSERTING a new row in the wished TABLENAME.
We're going to affect the column called "HASHTEST" inserting the newly hashed text "firecatrocks"
It should insert something like:
Why should we hash?
Well, for various reasons.
One of them is, if the database gets hacked... All of your users are secured.
Their profile passwords are secured, unless the person who hacked the database knows how to de-hash them.
Another reason is, loyalty.
If you're not hashing the passwords, users may hate you for that, because they feel like they cant trust you.
You should always hash users passwords.
I hope you liked this tutorial!
Hey guys!
If you're going to comment this tutorial as "SUX" and stuff like that, don't even bother commenting and press the 'report' button.
If you're going to read the whole tutorial, and comment "Nice!", its much appreciated!
Script
If you're using the BlueG's MySQL plugin, you don't need to use the whirlpool plugin. (I said you don't need, but go a head if you want to..)
Theres another hashing system called "sha-1".
There are various types of sha, but I'm just going to explain sha-1.
Personally, I think sha1 is very good (of what I read).
Its secure, and good.
sha-1 is not breakable.
sha1 appeared in 1995 and it stands for secure hash algorithm.
There are 4 sha's (if I'm not mistaken) sha-0, sha-1, sha-2 and sha-3.
Ok, ok enough, lets go to the scripting.
When we want to use it while calling a query in MySQL, we simply do:
sha1('textparam[]')
Quite easy right?
No need to load any extra plugins, nor loading more natives.
I'm not sure if the lenght of the hashes vary or not, but I think not.
I'm pretty sure it doesnt, from the hashes of my users...
For example, if we want to use it on our daily register/login system, it would look like something like this:
mysql_query("INSERT INTO `TABLENAME` (HASHTEST) VALUES (sha1('firecatrocks'))");
So we are INSERTING a new row in the wished TABLENAME.
We're going to affect the column called "HASHTEST" inserting the newly hashed text "firecatrocks"
It should insert something like:
Код:
4102dfc6de209ff3839b4e664b59f83dd79e878b
Well, for various reasons.
One of them is, if the database gets hacked... All of your users are secured.
Their profile passwords are secured, unless the person who hacked the database knows how to de-hash them.
Another reason is, loyalty.
If you're not hashing the passwords, users may hate you for that, because they feel like they cant trust you.
You should always hash users passwords.
I hope you liked this tutorial!