def test_aes_cypher_with_key_shorter_than_blocksize():
    data = "Wow a wild data appeared."

    cypher = AESCipher(block_size=32)
    encrypted = cypher.encrypt(data)
    decrypted = cypher.decrypt(encrypted)
    assert data == decrypted
def test_aes_cypher_without_passing_key():
    data = "Wow a wild data appeared."

    cypher = AESCipher()
    encrypted = cypher.encrypt(data)
    decrypted = cypher.decrypt(encrypted)
    assert data == decrypted
예제 #3
0
def test_aes_cypher_with_key_shorter_than_blocksize():
    data = "Wow a wild data appeared."

    cypher = AESCipher(block_size=32)
    encrypted = cypher.encrypt(data)
    decrypted = cypher.decrypt(encrypted)
    assert data == decrypted
예제 #4
0
def test_aes_cypher_without_passing_key():
    data = "Wow a wild data appeared."

    cypher = AESCipher()
    encrypted = cypher.encrypt(data)
    decrypted = cypher.decrypt(encrypted)
    assert data == decrypted
def test_aes_cypher_by_passing_key():
    data = "Wow a wild data appeared."

    encrypt_cypher = AESCipher()
    encrypted = encrypt_cypher.encrypt(data)
    key = encrypt_cypher.key

    decrypt_cypher = AESCipher(key=key)
    decrypted = decrypt_cypher.decrypt(encrypted)
    assert data == decrypted
예제 #6
0
def test_aes_cypher_by_passing_key():
    data = "Wow a wild data appeared."

    encrypt_cypher = AESCipher()
    encrypted = encrypt_cypher.encrypt(data)
    key = encrypt_cypher.key

    decrypt_cypher = AESCipher(key=key)
    decrypted = decrypt_cypher.decrypt(encrypted)
    assert data == decrypted