Skip to content

Instantly share code, notes, and snippets.

@BrianHoldsworth
Forked from rietta/random_hash.sh
Last active January 4, 2016 17:38
Show Gist options
  • Save BrianHoldsworth/8654793 to your computer and use it in GitHub Desktop.
Save BrianHoldsworth/8654793 to your computer and use it in GitHub Desktop.
#!/bin/sh
head -n 4096 /dev/urandom | openssl md5 | base64
@BrianHoldsworth
Copy link
Author

Generates a random hash from the command-line by hashing random data with MD5, then Base 64 encoding the result. The result might be useful for things like random API tokens. It is 128 bits in length.

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