Skip to content

Instantly share code, notes, and snippets.

@techbless
Last active February 22, 2017 05:28
Show Gist options
  • Save techbless/5adf84a3a80065f31e2723eccb363ed2 to your computer and use it in GitHub Desktop.
Save techbless/5adf84a3a80065f31e2723eccb363ed2 to your computer and use it in GitHub Desktop.
this makes a password that length is 14
import scala.util.Random
object MakePassword extends App{
var list = List( 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D',
'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',
'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '~', '!', '@',
'#', '$', '%', '^', '&', '*', '(', ')', '-', '_', '=', '+', '[', ']', '{',
'}', '?', '<', '>', '.', '/' );
var list_len = list.length
var password = Random shuffle list drop list_len - 14
for(item <- password) {
print(item)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment