Create a gist now

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);
});

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

Owner

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