Skip to content

Instantly share code, notes, and snippets.

@andreaganduglia
Created April 26, 2019 09:05
Show Gist options
  • Save andreaganduglia/d8e088f9dc7129b80161a264a50ab7c0 to your computer and use it in GitHub Desktop.
Save andreaganduglia/d8e088f9dc7129b80161a264a50ab7c0 to your computer and use it in GitHub Desktop.
BASH - Generate a random string base64 encoded. Useful for generate keys.
#!/bin/bash
dd if=/dev/urandom bs=1024 count=1 status=none | base64
# You can adjust length simply change `bs' value.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment