Skip to content

Commit

Permalink
Remove deprecated saml2.aes module
Browse files Browse the repository at this point in the history
Use saml2.cryptography.symmetric instead

Signed-off-by: Ivan Kanakarakis <ivan.kanak@gmail.com>
  • Loading branch information
c00kiemon5ter committed Dec 26, 2019
1 parent 9982e4b commit b3635ec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 24 deletions.
16 changes: 0 additions & 16 deletions src/saml2/aes.py

This file was deleted.

16 changes: 8 additions & 8 deletions tests/test_92_aes.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import os

import saml2.aes
from saml2.cryptography.symmetric import AESCipher


class TestAES():
def test_aes_defaults(self):
original_msg = b'ToBeOrNotTobe W.S.'
key = os.urandom(16)
aes = saml2.aes.AESCipher(key)
aes = AESCipher(key)

encrypted_msg = aes.encrypt(original_msg)
decrypted_msg = aes.decrypt(encrypted_msg)
Expand All @@ -16,7 +16,7 @@ def test_aes_defaults(self):
def test_aes_128_cbc(self):
original_msg = b'ToBeOrNotTobe W.S.'
key = os.urandom(16)
aes = saml2.aes.AESCipher(key)
aes = AESCipher(key)
alg = 'aes_128_cbc'

encrypted_msg = aes.encrypt(original_msg, alg=alg)
Expand All @@ -26,7 +26,7 @@ def test_aes_128_cbc(self):
def test_aes_128_cfb(self):
original_msg = b'ToBeOrNotTobe W.S.'
key = os.urandom(16)
aes = saml2.aes.AESCipher(key)
aes = AESCipher(key)
alg = 'aes_128_cfb'

encrypted_msg = aes.encrypt(original_msg, alg=alg)
Expand All @@ -36,7 +36,7 @@ def test_aes_128_cfb(self):
def test_aes_192_cbc(self):
original_msg = b'ToBeOrNotTobe W.S.'
key = os.urandom(24)
aes = saml2.aes.AESCipher(key)
aes = AESCipher(key)
alg = 'aes_192_cbc'

encrypted_msg = aes.encrypt(original_msg, alg=alg)
Expand All @@ -46,7 +46,7 @@ def test_aes_192_cbc(self):
def test_aes_192_cfb(self):
original_msg = b'ToBeOrNotTobe W.S.'
key = os.urandom(24)
aes = saml2.aes.AESCipher(key)
aes = AESCipher(key)
alg = 'aes_192_cfb'

encrypted_msg = aes.encrypt(original_msg, alg=alg)
Expand All @@ -56,7 +56,7 @@ def test_aes_192_cfb(self):
def test_aes_256_cbc(self):
original_msg = b'ToBeOrNotTobe W.S.'
key = os.urandom(32)
aes = saml2.aes.AESCipher(key)
aes = AESCipher(key)
alg = 'aes_256_cbc'

encrypted_msg = aes.encrypt(original_msg, alg=alg)
Expand All @@ -66,7 +66,7 @@ def test_aes_256_cbc(self):
def test_aes_256_cfb(self):
original_msg = b'ToBeOrNotTobe W.S.'
key = os.urandom(32)
aes = saml2.aes.AESCipher(key)
aes = AESCipher(key)
alg = 'aes_256_cfb'

encrypted_msg = aes.encrypt(original_msg, alg=alg)
Expand Down

0 comments on commit b3635ec

Please sign in to comment.