aes_gcm_native.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:python-omemo 作者: omemo 项目源码 文件源码
def aes_encrypt(key, iv, plaintext):
    """ Use AES128 GCM with the given key and iv to encrypt the plaintext. """
    backend = default_backend()
    encryptor = Cipher(
        algorithms.AES(key),
        GCM(iv),
        backend=backend).encryptor()
    return encryptor.update(plaintext) + encryptor.finalize() + encryptor.tag
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号