summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIvan Kanakarakis <ivan.kanak@gmail.com>2019-12-26 15:03:17 +0200
committerIvan Kanakarakis <ivan.kanak@gmail.com>2019-12-26 16:23:41 +0200
commitb3635ec9792e0d2bc9682a14987248f37242a659 (patch)
tree9d1297ff54d323fbc0df09e8fddbcb2e6c584303 /tests
parent9982e4bfe48ae611876964671c0f43eb9206c69c (diff)
downloadpysaml2-b3635ec9792e0d2bc9682a14987248f37242a659.tar.gz
Remove deprecated saml2.aes module
Use saml2.cryptography.symmetric instead Signed-off-by: Ivan Kanakarakis <ivan.kanak@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/test_92_aes.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/test_92_aes.py b/tests/test_92_aes.py
index 564260bc..424ee15d 100644
--- a/tests/test_92_aes.py
+++ b/tests/test_92_aes.py
@@ -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)
@@ -16,7 +16,7 @@ class TestAES():
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)
@@ -26,7 +26,7 @@ class TestAES():
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)
@@ -36,7 +36,7 @@ class TestAES():
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)
@@ -46,7 +46,7 @@ class TestAES():
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)
@@ -56,7 +56,7 @@ class TestAES():
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)
@@ -66,7 +66,7 @@ class TestAES():
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)