X-Git-Url: https://src.twobees.de/?a=blobdiff_plain;f=stow%2Foh-my-zsh%2F.oh-my-zsh%2Fplugins%2Fgenpass%2Fgenpass-monkey;fp=stow%2Foh-my-zsh%2F.oh-my-zsh%2Fplugins%2Fgenpass%2Fgenpass-monkey;h=0000000000000000000000000000000000000000;hb=1a8e170bbe5c6641a26ab1ce2e6ce6c5c1faa4cd;hp=94ff5e13123ccec1e32a6a0a070478f6fa1ec3f6;hpb=475ba35502579302593f4735c853c49ef1845dcb;p=dotfiles.git diff --git a/stow/oh-my-zsh/.oh-my-zsh/plugins/genpass/genpass-monkey b/stow/oh-my-zsh/.oh-my-zsh/plugins/genpass/genpass-monkey deleted file mode 100755 index 94ff5e1..0000000 --- a/stow/oh-my-zsh/.oh-my-zsh/plugins/genpass/genpass-monkey +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env zsh -# -# Usage: genpass-monkey [NUM] -# -# Generate a password made of 26 alphanumeric characters -# with the security margin of at least 128 bits. -# -# Example password: nz5ej2kypkvcw0rn5cvhs6qxtm -# -# If given a numerical argument, generate that many passwords. - -emulate -L zsh -o no_unset -o warn_create_global -o warn_nested_var - -if [[ ARGC -gt 1 || ${1-1} != ${~:-<1-$((16#7FFFFFFF))>} ]]; then - print -ru2 -- "usage: $0 [NUM]" - return 1 -fi - -zmodload zsh/system || return - -{ - local -r chars=abcdefghjkmnpqrstvwxyz0123456789 - local c - repeat ${1-1}; do - repeat 26; do - sysread -s1 c || return - # There is uniform because $#chars divides 256. - print -rn -- $chars[#c%$#chars+1] - done - print - done -}