Powered by Tachyonic Project Luxon Framework v0.0.0

Luxon Framework for rapid application development. (luxon)

Version

Passwords

Hash Password

luxon.utils.password.hash(password, algo=1, rounds=12)[source]

Hash Password.

Provide a simple interface for hashing passwords using specified algorithm and rounds.

Parameters:
  • password (str) – Clear Text Password
  • algo (str) –

    algorithm (defined in luxon.constants)

    • CLEARTEXT
    • BLOWFISH
    • SHA256
    • SHA512
    • LDAP_MD5
    • LDAP_SMD5
    • LDAP_SHA1
    • LDAP_SSHA1
    • LDAP_CLEARTEXT
    • LDAP_BLOWFISH
    • LDAP_SHA256
    • LDAP_SHA512
  • rounds (int) – Hashing rounds…
Returns:

Hashed value of password.

Valid Password

luxon.utils.password.valid(password, hashed)[source]

Validate password against hash.

Parameters:
  • password (str) – Clear Text Password
  • hashed (str) – Hashed value of Password
Returns:

True if password matches.