Skip to content

Commit

Permalink
Merge branch 'crud'
Browse files Browse the repository at this point in the history
  • Loading branch information
francesco-filicetti committed Nov 13, 2023
2 parents 268ff18 + c378e5d commit 85b292a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ricerca_app/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ def encrypt(value): # pragma: no cover
if not value:
return None
value = str(value)
return Fernet(settings.ENCRYPTION_KEY).encrypt(value.encode()).decode()
iv = b'\xbd\xc0,\x16\x87\xd7G\xb5\xe5\xcc\xdb\xf9\x07\xaf\xa0\xfa'
return Fernet(settings.ENCRYPTION_KEY)._encrypt_from_parts(value.encode(), 0, iv).decode()
# return Fernet(settings.ENCRYPTION_KEY).encrypt(value.encode()).decode()


def decrypt(value): # pragma: no cover
Expand Down

0 comments on commit 85b292a

Please sign in to comment.