Skip to content

Commit

Permalink
Add test using digest-method for aes-ctr
Browse files Browse the repository at this point in the history
Reproduces #3
  • Loading branch information
nathan-muir committed Feb 21, 2017
1 parent f3d4bfe commit 3ac534f
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/test_crypto.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ def test_aes_ctr_legacy():
)
assert plaintext == recovered_plaintext

material = aes_ctr.seal_aes_ctr_legacy(
key_service,
plaintext,
digest_method='SHA512'
)
recovered_plaintext = aes_ctr.open_aes_ctr_legacy(
key_service, material
)
assert plaintext == recovered_plaintext


def test_aes_ctr():
key_service = DummyKeyService()
Expand All @@ -45,6 +55,16 @@ def test_aes_ctr():
)
assert plaintext == recovered_plaintext

material = aes_ctr.seal_aes_ctr(
key_service,
plaintext,
digest_method='SHA512'
)
recovered_plaintext = aes_ctr.open_aes_ctr(
key_service, material
)
assert plaintext == recovered_plaintext


def test_aes_gcm():
key_service = DummyKeyService()
Expand Down

0 comments on commit 3ac534f

Please sign in to comment.