configfiles/zsh/.zsh/10-helpers.zsh

9 lines
172 B
Bash

mkpasswd() {
LEN=${1:-30}
tr -cd ' -~' < /dev/urandom | fold -w $LEN | sed 1q
}
mkpasswd2() {
LEN=${1:-30}
base64 < /dev/urandom | fold -w $LEN | sed 1q
}