# How are user password encrypted in database exactly?

**URL:** <https://community.grafana.com/t/how-are-user-password-encrypted-in-database-exactly/6806>\
**Category:** General\
**Created:** [April 12, 2018, 2:33pm UTC](https://community.grafana.com/t/how-are-user-password-encrypted-in-database-exactly/6806 "2018-04-12T14:33:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![noxworld](https://avatars.discourse-cdn.com/v4/letter/n/f14d63/32.png) [@noxworld](https://community.grafana.com/u/noxworld)\
**Post date:** [April 12, 2018, 2:33pm UTC](https://community.grafana.com/t/how-are-user-password-encrypted-in-database-exactly/6806/1 "2018-04-12T14:33:03Z")

</div>

Hey,

I’m actually trying to develop a small plugin that use Grafana session to see if a grafana user is authenticated and has rightfull access. Right now i want to allow them to login to my plugin outside Grafana (but based of grafana user accounts), so i need to know how the passwords are hashed to be able to log them.

I found that you guys use pbkdf2. Here is the post : [Local authentication password encrypted or not?](https://community.grafana.com/t/local-authentication-password-encrypted-or-not/1594)

My questions : how do i know the number of iteration, keylength and hash algorithm used ?

(If i get it right, the salt is located in the database, the password is input by the user, and the algorithm is SHA256 ? ) Absolutely no clue on the iteration and keylength though …

Please help !

---

<div class="post-metadata">

**Author:** ![anon80964540](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@anon80964540](https://community.grafana.com/u/anon80964540)\
**Post date:** [January 13, 2021, 4:40pm UTC](https://community.grafana.com/t/how-are-user-password-encrypted-in-database-exactly/6806/2 "2021-01-13T16:40:23Z")

</div>


