hash_taipy_password() function

Generate a hashed password for the Taipy authenticator.

Available in Taipy Enterprise only

This function exists only in the Enterprise edition of Taipy.

If the application relies on the internal authenticator (the "Taipy" authenticator protocol), and if passwords are required, then all passwords need to be hashed before they are provided to the authenticator (in the users database file or dictionary).

In order to hash the password string, this function needs to be provided with a secret text value that initializes the hashing process. This text string must be stored in the environment variable 'TAIPY_AUTH_HASH'. This allows to make it impossible to find the original password should someone find hashed text string, and hide the hashing key away from text files.

Parameters:

Name Type Description Default
password str

The plain text password to be encoded.

required

Returns:

Name Type Description
str str

A hashed version of password for the current setting of the TAIPY_AUTH_HASH environment variable.

Raises:

Type Description
ValueError

The environment variable TAIPY_AUTH_HASH is not set, or set to an invalid value.