Skip to content

Instantly share code, notes, and snippets.

@bpesquet
Last active June 6, 2017 11:10
Show Gist options
  • Save bpesquet/501c789f01e5bdeda90d to your computer and use it in GitHub Desktop.
Save bpesquet/501c789f01e5bdeda90d to your computer and use it in GitHub Desktop.
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);
});
@bpesquet
Copy link
Author

@sangimed Fixed, thanks!

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