Correct me if any of my assumptions are off.
When you hash something like with sha1, you can't reverse the hashed data to get the original string.
Because of this, if I have an email, which I will need to use later, stored in the database, I can't use sha1 on it.
However, I still want to protect in case of a breach, so what do I do?
I'm using django which stores a secret_key in settings.py.
I tried using AES encryption, but noticed that as the string encoded is longer, the encrypted string returned is longer, which makes sense. However, the encryption string is very much longer than the original string. Is there a type of encryption where the string returned is the same size of the original string? Cuz I'm using django user model and the email is limited to 75, so if a user used a 32-75char email, the encrypted string is 128 in length which is > 75, so it can't be stored in the column.