Hoping for a simple function I can use to store emails securely and retrieve easily when required to send emails.
Can I hash/encrypt or otherwise protect emails in my Django app from hackers?
Asked Answered
Kind of a general question, but here are a few solutions I'm familiar with:
- use django-encrypted-fields, which has an EncryptedEmailField
- you can override the save method for encrypting the email yourself, then override the post_init signal for decryption. See example here (which is based on this)
- you can build your own encrypted email field, see django snippet here (uses pyCrypto)
- you can use django-extension's EncryptedCharField
- If none of the above seems good enough, try google-ing around by yourself. You're probably not the first to tackle this problem
good luck.
I'm sure I can get one of those to work. Thanks for the quick summary of options. –
Faubion
© 2022 - 2024 — McMap. All rights reserved.