# Django encryption usage

**URL:** <https://forum.djangoproject.com/t/django-encryption-usage/46166>\
**Category:** Using Django\
**Created:** [October 9, 2026, 3:14pm UTC](https://forum.djangoproject.com/t/django-encryption-usage/46166 "2026-10-09T15:14:41Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomislavm021](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/tomislavm021/32/13462_2.png) [@tomislavm021](https://forum.djangoproject.com/u/tomislavm021)\
**Post date:** [October 9, 2026, 3:14pm UTC](https://forum.djangoproject.com/t/django-encryption-usage/46166/1 "2026-10-09T15:14:41Z")

</div>

Can anyone tell me where can i learn about encription in Django?

I am referring to entering some data like passwords and usernames, saving it, then later being able to see that data.

Thank you

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [October 9, 2026, 3:51pm UTC](https://forum.djangoproject.com/t/django-encryption-usage/46166/2 "2026-10-09T15:51:50Z")

</div>

Clarification - Django does not encrypt passwords, it creates a non-reversable hash from them. That’s why you _can’t_ see passwords previously set.

There actually isn’t any “built-in” encryption within Django. Any encryption being used is performed by third-party packages.

It would be helpful if you were provided more detail regarding the use-case you’re trying to research.

---

<div class="post-metadata">

**Author:** ![tomislavm021](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/tomislavm021/32/13462_2.png) [@tomislavm021](https://forum.djangoproject.com/u/tomislavm021)\
**Post date:** [October 9, 2026, 9:06pm UTC](https://forum.djangoproject.com/t/django-encryption-usage/46166/3 "2026-10-09T21:06:24Z")

</div>

Thank you.

I have a web app built with django, where i have all my login data for all the domains, hosting, software and tools i am using. I was using one Google dock to store that data, but while working in Django, i had an idea, why wouldnt i create a centralised place to store everything and have all in one place.

That web app has login, register and 2fa setup, i login and i find the credentials i need.

But then i showed the project to a few people who also do websites, have agencies and manage tens of accounts, and they want to use the web app, like i am using it.

While i am the only user, i don’t have a problem storing passwords in postgress. I login and i find what i need.

But if i were to offer this to other people who have the same problem as i do, in that case i have to hide the passwords and other important data, so only they can see it.

So that is the use case, i hope it helps.

Thank you.

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [October 9, 2026, 9:48pm UTC](https://forum.djangoproject.com/t/django-encryption-usage/46166/4 "2026-10-09T21:48:07Z")

</div>

> [@tomislavm021](#):
>
> in that case i have to hide the passwords and other important data, so only they can see it.

Encryption is not _necessary_ for this. It seems to me that what is more important is what’s known as “row-level security”. What you really want to do is ensure that the views displaying data only show data to the owners.

(You can add an encryption layer on top of that, to reduce the possibility of the data being compromised if the server itself is compromised.)

But neither of these are intrinsic features within Django. You will need to write the code to implement this.

---

<div class="post-metadata">

**Author:** ![tomislavm021](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/tomislavm021/32/13462_2.png) [@tomislavm021](https://forum.djangoproject.com/u/tomislavm021)\
**Post date:** [October 9, 2026, 10:03pm UTC](https://forum.djangoproject.com/t/django-encryption-usage/46166/5 "2026-10-09T22:03:57Z")

</div>

Thank you, yes that is what i needed advice on. Where can i learn about that subject? Of course i know how to show the data to agency staff who owns the object, but i don’t know how to do that additional step so don’t save passwords in the db.

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [October 9, 2026, 10:23pm UTC](https://forum.djangoproject.com/t/django-encryption-usage/46166/6 "2026-10-09T22:23:03Z")

</div>

I’m going to suggest strongly not going in that direction, until you become a lot more familiar with encryption technology in general.

If you encrypt someone’s data, then the password to decrypt (the decryption key) that persons data needs to be private but available to your app.

That generally means that either the decryption key is stored on the server - in which case it’s lost if the server is compromised.

Or, the decryption key could be associated with the person - perhaps using their password or associated with their password. This is fine - until that individual forgets their password, in which case you’ve now lost access to their data.

So doing this, without a suitable key-archive or key-recovery process is very dangerous from a system-usability perspective.

(I’m greating simplifying things here - but I think you’ve got the general idea. It’s quite an intricate topic.)

---

<div class="post-metadata">

**Author:** ![tomislavm021](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/tomislavm021/32/13462_2.png) [@tomislavm021](https://forum.djangoproject.com/u/tomislavm021)\
**Post date:** [October 13, 2026, 5:48pm UTC](https://forum.djangoproject.com/t/django-encryption-usage/46166/7 "2026-10-13T17:48:27Z")

</div>

> [@KenWhitesell](#):
>
> m going to suggest strongly not going in that direction, until you become a lot more familiar with encryption technology in general.
> 
> If you encrypt someone’s data, then the password to decrypt (the decryption key) that persons data needs to be private but available to your app.
> 
> That generally means that either the decryption key is stored on the server - in which case it’s lost if the server is compromised.
> 
> Or, the decryption key could be associated with the person - perhaps using their password or associated with their password. This is fine - until that individual forgets their password, in which case you’ve now lost access to their data.
> 
> So doing this, without a suitable key-archive or key-recovery proce

Thank you very much. I understand the topic i wide and complex. That was my idea to ask what do i need to learn more, in order to create that. That is the piece that i am missing. Currently all sensitive data is stored on the server, i login and i see the credentials i need.

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [October 13, 2026, 11:49pm UTC](https://forum.djangoproject.com/t/django-encryption-usage/46166/8 "2026-10-13T23:49:16Z")

</div>

> [@tomislavm021](#):
>
> That was my idea to ask what do i need to learn more, in order to create that.

I’m sorry, I don’t understand exactly what you’re referring to here.  
“… in order to create that.” - to create what?

> [@tomislavm021](#):
>
> Currently all sensitive data is stored on the server, i login and i see the credentials i need.

I’m not following what you’re saying here, or at least I’m not seeing how this relates to encryption.

What I think I’m understanding so far, is that you want to encrypt data on the server, such that each user can only decrypt their data.

Decrypting data requires a decryption key. That means that each person will have a personal decryption key.

Where and how is that key going to be stored?
