Automatically migrated from Gitolite
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
450 B

7 years ago
  1. #!/usr/bin/env coffee
  2. scrypt = require "scrypt-for-humans"
  3. Promise = require "bluebird"
  4. read = Promise.promisify(require "read")
  5. Promise.try ->
  6. read(prompt: "Enter a password:", silent: true)
  7. .spread (password, isDefault) ->
  8. if password.trim().length == 0
  9. console.log "You didn't enter a password!"
  10. process.exit(1)
  11. scrypt.hash(password)
  12. .then (hash) ->
  13. console.log "Hash:", hash
  14. console.log "Set this hash in your config.json to use it."