# Query to validate hash password from user source database

**URL:** <https://forum.inductiveautomation.com/t/query-to-validate-hash-password-from-user-source-database/86861>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [March 5, 2024, 10:27pm UTC](https://forum.inductiveautomation.com/t/query-to-validate-hash-password-from-user-source-database/86861 "2024-03-05T22:27:07Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![dillon](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dillon/32/81537_2.png) [@dillon](https://forum.inductiveautomation.com/u/dillon)\
**Post date:** [May 29, 2025, 12:29pm UTC](https://forum.inductiveautomation.com/t/query-to-validate-hash-password-from-user-source-database/86861/12 "2025-05-29T12:29:55Z")

</div>

Had to figure this out myself not too long ago

> [@Internal Authentication Password Encoding](https://forum.inductiveautomation.com/t/internal-authentication-password-encoding/104959/7):
>
> Working Python function for others that achieves the same thing import random import hashlib def sha256PasswordSalt(password): rand = random.Random() salt = "{:08X}".format(rand.randint(0, 0xFFFFFFFF)) hashedPass = hashlib.sha256((password + salt).encode('utf-8')).hexdigest() return "[{}]{}".format(salt, hashedPass)

---

_[View the full topic](https://forum.inductiveautomation.com/t/query-to-validate-hash-password-from-user-source-database/86861)._
