Added documentation for generate_secret