And refactor key generation to be located in ONE central utility method to avoid issues like that in the future. Closes #3366
And refactor key generation to be located in ONE central utility method to avoid issues like that in the future. Closes #3366