New function to generate unique secret for passed

New function gen_secret.py which uses the users password and shared
secret to generate a unique secret to encrypt the users password hash