Programming 11/12: VB Assignment 6 – KeyGen

For this assignment, you will create a key generator to crack the product verification software for Kamsino.net’s Half Roulette (see download below). The key generator will randomly generate a number between 10000000 and 99999999 (8 digits) that is a multiple of the basekey. The basekey depends on the user’s name after converting into lowercase: it is the sum of each character’s Ascii code.

For example, if the user name is ‘MrKam’, its corresponding Ascii code for each character will be:

  • m = 109
  • r = 114
  • k = 107
  • a = 97
  • m = 109

Therefore, the basekey for “MrKam” is 109 + 114 + 107 + 97 + 109 = 536.  Any number which is a multiple of 536 between 10000000 and 99999999 are valid product keys. One example (out of 167910 possible product keys) includes 53600000.

Hint: a multiple divides by the basekey with no remainder.

Test Cases

  • Instructions: Download the zip file and then extract the archive directly to the Projects folder [Product Verification.zip].

Evaluation: 10 marks

  • Interface (2 marks)
  • One product key that works (3 marks)
  • Random keys (3 marks)
  • Code logic (2 marks)