uccser/cs-field-guide

View on GitHub
csfieldguide/static/interactives/password-guesser/js/passwords.js

Summary

Maintainability
A
0 mins
Test Coverage
/**
 * Module for all the passwords used in Password Guesser.
 * 
 * Passwords are stored in lists of lists, where each list is four items:
 * [name, the password or encryption , salt, [encryption with salt]]
 * The id of each password is a person's name
 * 
 * Language-specific passwords are stored as plaintext and encrypted at runtime
 * The remainder are encrypted in advance
 * 
 * Salts were generated at https://www.random.org/strings/
 */

/**
 * Passwords that are language specific
 * stored as plaintext
 * 
 * Easy difficulty
 */
var LanguagePasswords = [
  ["Alice", gettext("Maths"),     "3Lh7nlv4vw0glpq5", null],
  ["Bob",   gettext("History"),   "jRsZZaY2fBppefuf", null],
  ["Casey", gettext("Art"),       "BIOAEb6DLc6RDopT", null],
  ["Dave",  gettext("Chemistry"), "5YpTZ9kJzk1Mn4xO", null],
];

/**
 * Passwords that are one specific sequence of characters
 * encrypted in advance
 * 
 * Easy-medium difficulty
 */
var WordPasswords = [
  ["Evelyn",   "5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5", "4B9iTLSL27THrK0M", "593A4CA0674F8729B7192F48801E765B60430C61F07303D01505010D2AEADFA3"],
  ["Frank",    "5994471ABB01112AFCC18159F6CC74B4F511B99806DA59B3CAF5A9C173CACFC5", "9pUOuSMy8g5gosp7", "22CB49E86CE07869D909D30C40566E15B10118F33F65F048092A1946F3843447"],
  ["Grant",    "65E84BE33532FB784C48129675F9EFF3A682B27168C0EA744B2CF58EE02337C5", "B3W2w9A16ZTC0qKc", "EF6B7840D5219F7CE78E84039A1EE18F63173795BD16F31107E4B01E7DD49241"],
  ["Hannah",   "04F8996DA763B7A969B1028EE3007569EAF3A635486DDAB211D512C85B9DF8FB", "F0LGkqngVY2i3WPP", "76FD57D1416244A0FBEA3718AD972420B4AF10E9DF73F71E10BB3E1FB1EB2540"],
  ["Isabelle", "8C6976E5B5410415BDE908BD4DEE15DFB167A9C873FC4BB8A81F6F2AB448A918", "gdDAOlnmLtEeSlhY", "0E66D5C838959F2A00C55D392281401FB55452CDF11F802D767D054EFFC1AF55"],
  ["Jack",     "97C94EBE5D767A353B77F3C0CE2D429741F2E8C99473C3C150E2FAA3D14C9DA6", "rRiTDOYooATVXmdR", "439464EF67EA97952C588A2C4032756D7F2CC8CC7FC24619AEA0D85FD2A91FD4"],
  ["Kate",     "9184796BD1CF143C86029124DC0673097181F5C9F35A997B943F1A708E5D8C98", "piHNbJunE1U1zorO", "A6DF90D91F5EFE7DAC98F797135E3D872176D3416D25318BC7F1AF704466261A"],
  ["Liam",     "0A66B00BB789BE6526CCB0BD3F8247CA3925CEFBC5BD43AD8968A0B0BE63861E", "uIKp9FjJ6QsF6qvS", "BA9FC99BAC73C7240D3F33D154E96F7943C963BE2F97DD0C50E433F374AC44BA"],
  ["Michaela", "2727C279420E42CC2B7403DA760F7E62A97B1312E2BA34D88E28CCB6CF7B37AF", "kojuVmBIvkQCzrXp", "473D31001A251E7C8CBA52F02D4CF61FFE1253C5E2B48DDB2EAEA1DC074A5AD1"],
  ["Nat",      "9C97925A4F70A1C58EBA7A2D6E6ED3FE76FA5EB76AC2A2700E36429F4A5F8F80", "uLep9JTiRmM1T9gr", "3A9F7FF3E7EAB9098847D1558428271FBF1BC82898735CEEA398705FF1124117"],
];

module.exports = {
  LanguagePasswords,
  WordPasswords,
};