gooshie commented on a Page, Password Generator  -  Sep 23, 2009

Sloth
NO, I win! Mine goes to 4144 characters!

alias passgen {
  var %r
  while $len(%r) < $1 {
    %r = %r $+ $chr($remove($r(48,122),58,59,60,61,62,63,64,91,92,93,94,95,96))
  }
  return %r
}

However, I like Thelmac's best but to be perfectly 'fair' his should be like this:

alias genpass { return $eval($ $+ +( $str($!iif($floor($calc($r(0,61)/10)),$iif($r(0,1),$r(A,Z),$r(a,z)),$r(0,9)) $+ $chr(44),$1) ),2) }

This way is a close enough approximation:

alias genpass { return $eval($ $+ +( $str($!iif($r(0,5),$iif($r(0,1),$r(A,Z),$r(a,z)),$r(0,9)) $+ $chr(44),$1) ),2) }

His original version produces about 50% numbers in the string.

Also, Thelmac if you need a password 469 characters you can:
$str($genpass(67),7)

alias PWgen $left($str($genpass(79),52), $1)

To produce up to 4108 character passwords.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.