From b2fa4b7499e9ca70568bdb33eae99a22e9ed2cc6 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Fri, 6 Jun 2014 22:07:56 -0500 Subject: add load_rsa_*_numbers functions --- .../hazmat/primitives/asymmetric/serialization.rst | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'docs/hazmat/primitives/asymmetric') diff --git a/docs/hazmat/primitives/asymmetric/serialization.rst b/docs/hazmat/primitives/asymmetric/serialization.rst index 2b3eb511..e53d0d1f 100644 --- a/docs/hazmat/primitives/asymmetric/serialization.rst +++ b/docs/hazmat/primitives/asymmetric/serialization.rst @@ -98,3 +98,41 @@ header that mentions the type of the serialized key. e.g. :raises UnsupportedAlgorithm: If the serialized key is of a type that is not supported by the backend or if the key is encrypted with a symmetric cipher that is not supported by the backend. + + +RSA Numbers +~~~~~~~~~~~ + +.. function:: load_rsa_private_numbers(numbers, backend) + + .. versionadded:: 0.5 + + Create a private key instance using the given backend and numbers. + + :param numbers: An instance of + :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateNumbers`. + + :param backend: A + :class:`~cryptography.hazmat.backends.interfaces.RSABackend` provider. + + :returns: A new instance of a private key. + + :raises UnsupportedAlgorithm: If the given backend does not support loading + numbers. + +.. function:: load_rsa_public_numbers(numbers, backend) + + .. versionadded:: 0.5 + + Create a public key instance using the given backend and numbers. + + :param numbers: An instance of + :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPublicNumbers`. + + :param backend: A + :class:`~cryptography.hazmat.backends.interfaces.RSABackend` provider. + + :returns: A new instance of a public key. + + :raises UnsupportedAlgorithm: If the given backend does not support loading + numbers. -- cgit v1.2.3