Skip to content

Instantly share code, notes, and snippets.

@kodie
Last active May 12, 2021 16:55
Show Gist options
  • Save kodie/63c3914a03939f9b05500ebe0fa7a26f to your computer and use it in GitHub Desktop.
Save kodie/63c3914a03939f9b05500ebe0fa7a26f to your computer and use it in GitHub Desktop.
Generates a bcrypt string of a sha256sum of a password to be manually entered into your Meteor app's database
bcrypt $(echo -n "PASSWORD HERE" | sha256sum | cut -d " " -f 1) && echo
# or this
htpasswd -bnBC 10 "" $(echo -n "PASSWORD HERE" | sha256sum | cut -d " " -f 1) | tr -d ':\n' | sed 's/$2y/$2a/'
# orrrr this
htpasswd -bnBC 10 "" $(echo -n "PASSWORD HERE" | shasum -a 256 | cut -d " " -f 1) | tr -d ':\n' | sed 's/$2y/$2a/'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment