Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Hashed password generation with Silex
$app->get('/hashpwd', function() use ($app) {
$rawPassword = 'secret';
$salt = '%qUgq3NAYfC1MKwrW?yevbE';
$encoder = $app['security.encoder.bcrypt'];
return $encoder->encodePassword($rawPassword, $salt);
Copy link

sangimed commented Nov 29, 2015

it's rather $rawPassword than $raw in the first argument of $encoder->encodePassword()

Copy link

bpesquet commented Nov 29, 2015

@sangimed Fixed, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment