how to generate or create a encrypted key