Changing generate_secret_key() method to return a string

I'm not sure what the original intention of the method was but I thought it would be better to return the generated key as a string.