Code:
mysql> select PASSWORD('maliperica');
+-------------------------------------------+
| PASSWORD('maliperica') |
+-------------------------------------------+
| *982E4BF1CDAAB8626EA54DA69D429F1F1E888623 |
+-------------------------------------------+
1 row in set (0.03 sec)
mysql> select sha1('maliperica');
+------------------------------------------+
| sha1('maliperica') |
+------------------------------------------+
| aa17608ca245b12c7c1ea8d521fdd896d2c45a24 |
+------------------------------------------+
1 row in set (0.00 sec)
mysql> select md5('maliperica');
+----------------------------------+
| md5('maliperica') |
+----------------------------------+
| 43373e895bd6c73f11043e2ad94bf5a6 |
+----------------------------------+
1 row in set (0.00 sec)
mysql> select OLD_PASSWORD('maliperica');
+----------------------------+
| OLD_PASSWORD('maliperica') |
+----------------------------+
| 1bfe725d7438e320 |
+----------------------------+
1 row in set (0.00 sec)
funkcija password () nije direktno sha1() vec slicna, isto kao sto ni stara passwd() funkcija nije bila ista ko md5()
e sad, obavezno procitaj
http://dev.mysql.com/doc/refma...nctions.html#function_password
tu imas note koji ima smisla (ja licno vise volim da koristim mysqlov password() ali .. RFC 2195 se mora postovati ako pises nesto "vazno")
Citat:
The PASSWORD() function is used by the authentication system in MySQL Server; you should not use it in your own applications. For that purpose, consider MD5() or SHA2() instead. Also see RFC 2195, section 2 (Challenge-Response Authentication Mechanism (CRAM)), for more information about handling passwords and authentication securely in your applications.
i naravno, vazno:
Citat:
Statements that invoke PASSWORD() may be recorded in server logs or in a history file such as ~/.mysql_history, which means that plaintext passwords may be read by anyone having read access to that information. See Section 5.3.2, “Password Security in MySQL”.