From 3e0c21e274b32d9c6dd2ac41ee8607e37d400e83 Mon Sep 17 00:00:00 2001 From: David Reid Date: Tue, 13 May 2014 14:30:45 -0700 Subject: Documentation and interfaces for serialization to RSA*Numbers representations. --- docs/hazmat/primitives/interfaces.rst | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'docs/hazmat/primitives') diff --git a/docs/hazmat/primitives/interfaces.rst b/docs/hazmat/primitives/interfaces.rst index d5ca59ab..c27782e4 100644 --- a/docs/hazmat/primitives/interfaces.rst +++ b/docs/hazmat/primitives/interfaces.rst @@ -491,6 +491,40 @@ Asymmetric interfaces .. attribute:: name + +Key Serialization +----------------- + +.. class:: RSAPrivateNumbersSerialziation + + .. versionadded:: 0.5 + + .. method:: rsa_private_numbers() + + Serialize to an + :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateNumbers` + representation. + + :returns: An + :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateNumbers` + instance. + + +.. class:: RSAPublicNumberSerialization + + .. versionadded:: 0.5 + + .. method:: rsa_public_numbers() + + Serialize to an + :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPublicNumbers` + representation. + + :returns: An + :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPublicNumbers` + instance. + + Hash algorithms ~~~~~~~~~~~~~~~ -- cgit v1.2.3 From 48fe4151b03cd15098d72e2ed394fd08085803f0 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Sat, 7 Jun 2014 15:38:40 -0500 Subject: change names of key -> numbers interfaces --- docs/hazmat/primitives/interfaces.rst | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'docs/hazmat/primitives') diff --git a/docs/hazmat/primitives/interfaces.rst b/docs/hazmat/primitives/interfaces.rst index c27782e4..677199ca 100644 --- a/docs/hazmat/primitives/interfaces.rst +++ b/docs/hazmat/primitives/interfaces.rst @@ -492,33 +492,33 @@ Asymmetric interfaces .. attribute:: name -Key Serialization ------------------ +Raw Numbers +~~~~~~~~~~~ -.. class:: RSAPrivateNumbersSerialziation +.. class:: RSAPrivateNumbersAvailable .. versionadded:: 0.5 - .. method:: rsa_private_numbers() + .. method:: private_numbers() - Serialize to an + Create a :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateNumbers` - representation. + object. :returns: An :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateNumbers` instance. -.. class:: RSAPublicNumberSerialization +.. class:: RSAPublicNumbersAvailable .. versionadded:: 0.5 - .. method:: rsa_public_numbers() + .. method:: public_numbers() - Serialize to an + Create a :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPublicNumbers` - representation. + object. :returns: An :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPublicNumbers` -- cgit v1.2.3 From f0a48c6916bf7963dc27043401a73a685943a16c Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Sat, 7 Jun 2014 17:04:13 -0500 Subject: change to sub-interface idea --- docs/hazmat/primitives/interfaces.rst | 66 +++++++++++++++++------------------ 1 file changed, 33 insertions(+), 33 deletions(-) (limited to 'docs/hazmat/primitives') diff --git a/docs/hazmat/primitives/interfaces.rst b/docs/hazmat/primitives/interfaces.rst index 677199ca..8e6c2548 100644 --- a/docs/hazmat/primitives/interfaces.rst +++ b/docs/hazmat/primitives/interfaces.rst @@ -163,6 +163,22 @@ Asymmetric interfaces The bit length of the modulus. +.. class:: RSAPrivateKeyWithNumbers + + .. versionadded:: 0.5 + + Extends :class:`RSAPrivateKey`. + + .. method:: private_numbers() + + Create a + :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateNumbers` + object. + + :returns: An + :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateNumbers` + instance. + .. class:: RSAPublicKey @@ -219,6 +235,23 @@ Asymmetric interfaces The bit length of the modulus. +.. class:: RSAPublicKeyWithNumbers + + .. versionadded:: 0.5 + + Extends :class:`RSAPublicKey`. + + .. method:: public_numbers() + + Create a + :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPublicNumbers` + object. + + :returns: An + :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPublicNumbers` + instance. + + .. class:: DSAParameters .. versionadded:: 0.3 @@ -492,39 +525,6 @@ Asymmetric interfaces .. attribute:: name -Raw Numbers -~~~~~~~~~~~ - -.. class:: RSAPrivateNumbersAvailable - - .. versionadded:: 0.5 - - .. method:: private_numbers() - - Create a - :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateNumbers` - object. - - :returns: An - :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateNumbers` - instance. - - -.. class:: RSAPublicNumbersAvailable - - .. versionadded:: 0.5 - - .. method:: public_numbers() - - Create a - :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPublicNumbers` - object. - - :returns: An - :class:`~cryptography.hazmat.primitives.asymmetric.rsa.RSAPublicNumbers` - instance. - - Hash algorithms ~~~~~~~~~~~~~~~ -- cgit v1.2.3