GENERATED_KEY_LENGTH added for easier control