Fixed Issue with Key Generation

Key was evaluation over length of the int not over the value of the
int.