def test_encrypt_decrypt():
key = random._urandom(32)
message = random._urandom(32)
ciphertext = encrypt(message, key, HMAC_SHA256)
plaintext = decrypt(ciphertext, key, HMAC_SHA256, 32)
assert plaintext == message, plaintext
评论列表
文章目录