ako zmenit heslo priamo v db

Upozornění: Tohle vlákno je hodně staré a informace nemusí být platné pro současné Nette.
MKI-Miro
Člen | 272
+
0
-

Ahojte

potrebujem zmenit heslo priamo v db ale nerozumiem ako ho mam zakryptovat ?

Da sa to zakryptovat niekde online, bez toho aby som musel nejako volat tu defaultnu hash funkciu ?

(priklad ak predtym clovek chcel zakryptovat heslo cez sh1 tak som si nasiel online sh1 calculator a heslo bolo na svete)

Vdaka

Pavel Janda
Člen | 977
+
0
-

Zavolej si třeba z indexu toto:

echo \Nette\Security\Passwords::hash('tajne_heslo'); die;

index.php:

<?php

// Uncomment this line if you must temporarily take down your site for maintenance.
// require '.maintenance.php';

$container = require __DIR__ . '/../app/bootstrap.php';

echo \Nette\Security\Passwords::hash('tajne_heslo'); die;

$container->getByType('Nette\Application\Application')->run();

Ale záleží na tom, jakou kryptovací funkci používáš..

Editoval Beton (1. 4. 2015 11:27)