Mercurial > hg > isophonics-drupal-site
comparison core/scripts/password-hash.sh @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:46:53 +0100 |
parents | 4c8ae668cc8c |
children | 129ea1e6d783 |
comparison
equal
deleted
inserted
replaced
13:5fb285c0d0e3 | 14:1fec387a4317 |
---|---|
1 #!/usr/bin/env php | 1 #!/usr/bin/env php |
2 <?php | 2 <?php |
3 | 3 |
4 /** | 4 /** |
5 * @file | |
5 * Drupal hash script - to generate a hash from a plaintext password | 6 * Drupal hash script - to generate a hash from a plaintext password |
6 * | 7 * |
7 * @param password1 [password2 [password3 ...]] | 8 * @param password1 [password2 [password3 ...]] |
8 * Plain-text passwords in quotes (or with spaces backslash escaped). | 9 * Plain-text passwords in quotes (or with spaces backslash escaped). |
9 */ | 10 */ |
62 $kernel->boot(); | 63 $kernel->boot(); |
63 | 64 |
64 $password_hasher = $kernel->getContainer()->get('password'); | 65 $password_hasher = $kernel->getContainer()->get('password'); |
65 | 66 |
66 foreach ($passwords as $password) { | 67 foreach ($passwords as $password) { |
67 print("\npassword: $password \t\thash: ". $password_hasher->hash($password) ."\n"); | 68 print("\npassword: $password \t\thash: " . $password_hasher->hash($password) . "\n"); |
68 } | 69 } |
69 print("\n"); | 70 print("\n"); |
70 |