# Internal Authentication Password Encoding

**URL:** <https://forum.inductiveautomation.com/t/internal-authentication-password-encoding/104959>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [April 10, 2025, 4:53pm UTC](https://forum.inductiveautomation.com/t/internal-authentication-password-encoding/104959 "2025-04-10T16:53:23Z")\
**Posts on this page:** 1\
**Showing post:** 7

<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:** [April 10, 2025, 6:34pm UTC](https://forum.inductiveautomation.com/t/internal-authentication-password-encoding/104959/7 "2025-04-10T18:34:29Z")

</div>

Working Python function for others that achieves the same thing

```python
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/internal-authentication-password-encoding/104959)._
