georgemarshall / django-cryptography

Easily encrypt data in Django
https://django-cryptography.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
382 stars 75 forks source link

inheritance of settings #3

Closed omarwllorente closed 7 years ago

omarwllorente commented 8 years ago

Main changes are related to the inheritance of the options defined in settings.py though the rest of the code. Other minor changes to clarify name variables (case of key_salt in salted_hmac).

Most of the tests pass, but 3 (1 failure: test_encrypt_decrypt; and 2 errors: test_decryptor_invalid_token and test_unpadder_invalid_token, that both raise BadSignature errors instead of InvalidToken error).

Thanks.

codecov-io commented 8 years ago

Current coverage is 93.63%

Merging #3 into master will decrease coverage by 3.66%

@@             master         #3   diff @@
==========================================
  Files             6          6          
  Lines           407        424    +17   
  Methods           0          0          
  Messages          0          0          
  Branches         42         49     +7   
==========================================
+ Hits            396        397     +1   
- Misses            7         17    +10   
- Partials          4         10     +6   

Powered by Codecov. Last updated by cb580e3...557a7cf

omarwllorente commented 8 years ago

Hi George, I've changed the code to keep parity with django signing. I've added a signing variable called CRYPTOGRAPHY_SIGINGKEY which defaults to settings.SECRET_KEY if not specified in settings. Feel free to coment what you think about it. Thank you for your time.