Function Repository Resource:

RandomStrongPassword

Source Notebook

Create a safe password with random ASCII characters usually available on the keyboard (English and Latin characters)

Contributed by: Daniel de Souza Carvalho

ResourceFunction["RandomStrongPassword"][]

creates a random safe password string with 32 text characters.

ResourceFunction["RandomStrongPassword"][size]

creates a random safe password string of length size.

ResourceFunction["RandomStrongPassword"][size, n]

creates n random safe passwords.

Examples

Basic Examples (2) 

Create an standard safe password of length 32:

In[1]:=
ResourceFunction["RandomStrongPassword"][]
Out[1]=

Create a safe password of length 16:

In[2]:=
ResourceFunction["RandomStrongPassword"][16]
Out[2]=

Scope (2) 

Create 20 safe passwords of length 16:

In[3]:=
ResourceFunction["RandomStrongPassword"][16, 20]
Out[3]=

Visualize 20 new safe passwords of length 20 in columnar form:

In[4]:=
ResourceFunction["RandomStrongPassword"][20, 20] // Column
Out[4]=

Applications (2) 

Use WolframAlpha to test passwords for their strengths:

In[5]:=
# -> WolframAlpha["password strength " <> #, "ShortAnswer"] & ["D4niel"]
Out[5]=
In[6]:=
# -> WolframAlpha["password strength " <> #, "ShortAnswer"] & ["^dkhskei-00R"]
Out[6]=

Now, test the strength of a password generated using RandomStrongPassword:

In[7]:=
ResourceFunction["RandomStrongPassword"][]
Out[7]=
In[8]:=
# -> WolframAlpha["password strength " <> #, "ShortAnswer"] & [";4CBnWkf;C5Rsiw>w4o&oSVmjCjI!VDp"]
Out[8]=

Publisher

Daniel de Souza Carvalho

Version History

  • 1.0.0 – 22 July 2022

Related Resources

Author Notes

To create safe text passwords that at the same time are valid in Wolfram Language, Bash, Python and other environments and programming languages, some special characters are not used such as: quote ('), double quote ("), backtick (`) and backslash (\).

Of course it is not a good idea to send your password to the network (Internet) even by a secure channel.

Never send passwords in use to any website for testing.

It is appropriate to use strong passwords, and store them in password management tools.

License Information