! Copyright (C) 2019 Alexander Ilin. ! See http://factorcode.org/license.txt for BSD license. USING: fry literals math.ranges random sequences ; IN: random.passwords : password ( n charset -- string ) '[ [ _ random ] "" replicate-as ] with-secure-random ; : ascii-password ( n -- string ) ascii-printable-charset password ; : hex-password ( n -- string ) hex-charset password ; : alnum-password ( n -- string ) alphanum-charset password ;