def aes_ctr(key, ctr, data):
backend = default_backend()
cipher = Cipher(algorithms.AES(key), modes.CTR(ctr), backend=backend)
decryptor = cipher.decryptor()
return decryptor.update(data) + decryptor.finalize()
评论列表
文章目录