From 266b04a8ca03832c36c6d9b574d32d2cbf4858f5 Mon Sep 17 00:00:00 2001 From: erikvw Date: Wed, 20 Mar 2024 23:44:04 -0500 Subject: [PATCH] use methods to build formatted cipher --- django_crypto_fields/cipher/cipher.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/django_crypto_fields/cipher/cipher.py b/django_crypto_fields/cipher/cipher.py index 7bfd56a..bc9478b 100644 --- a/django_crypto_fields/cipher/cipher.py +++ b/django_crypto_fields/cipher/cipher.py @@ -39,10 +39,12 @@ def __init__( @property def cipher(self) -> bytes: - return self.hash_prefix + self.hashed_value + self.cipher_prefix + self.secret + return self.hash_with_prefix + self.secret_with_prefix + @property def hash_with_prefix(self) -> bytes: return self.hash_prefix + self.hashed_value + @property def secret_with_prefix(self) -> bytes: return self.cipher_prefix + self.secret