use Digest::MD5; print Digest::MD5::md5_base64( rand ), "\n"; # BxaMo0Fkirbh1A+9JbbvjQ