Skip to content

Instantly share code, notes, and snippets.

@adeekshith
Last active August 29, 2015 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adeekshith/a13a03ae2e5fe9c2958b to your computer and use it in GitHub Desktop.
Save adeekshith/a13a03ae2e5fe9c2958b to your computer and use it in GitHub Desktop.
This script generates pseodu random password or string of a given length
(* Pseudo Random Password generator of given length*)
(* Get all \
characters you would like to be a part of your password *)
letters[] := StringSplit[FromCharacterCode[Range[33, 126]], ""]
(* Pick up random characters from the list *)
GeneratePassword[n_] := StringJoin[RandomSample[letters[], n]]
(* Generate password*)
GeneratePassword[12]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment