from spidercrypt import internal_gen_key
from spidercrypt import internal_encrypt
from spidercrypt import internal_decrypt

def test_aes_encrypt_decrypt():

    key = internal_gen_key()

    data = b"Spidercrypt Security"

    encrypted = internal_encrypt(key, data)

    decrypted = internal_decrypt(key, encrypted)

    assert decrypted == data
