def from_key_bytes(cls, algorithm, key_bytes):
"""Builds a `Signer` from an algorithm suite and a raw signing key.
:param algorithm: Algorithm on which to base signer
:type algorithm: aws_encryption_sdk.identifiers.Algorithm
:param bytes key_bytes: Raw signing key
:rtype: aws_encryption_sdk.internal.crypto.Signer
"""
key = serialization.load_der_private_key(
data=key_bytes,
password=None,
backend=default_backend()
)
return cls(algorithm, key)
authentication.py 文件源码
python
阅读 28
收藏 0
点赞 0
评论 0
评论列表
文章目录