crypto.py 文件源码

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

项目:delta-sdk-python 作者: Covata 项目源码 文件源码
def decrypt_with_private_key(secret_key, private_encryption_key):
    """
    Decrypts the given secret key with the private key.

    :param bytes secret_key: the secret key to decrypt
    :param private_encryption_key: the private encryption key
    :type private_encryption_key: :class:`~rsa.RSAPrivateKey`
    :return: the decrypted key
    :rtype: bytes
    """
    return private_encryption_key.decrypt(
        secret_key,
        padding.OAEP(
            mgf=padding.MGF1(algorithm=hashes.SHA256()),
            algorithm=hashes.SHA256(),
            label=None))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号