Dynamically generate secret key.