From 2b3f0fc4d6641d040056466adc6dca7cfc75d3d5 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Mon, 17 Feb 2014 19:20:14 -0600 Subject: add docs for sign/verify ctx creation interface --- docs/hazmat/backends/interfaces.rst | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'docs/hazmat') diff --git a/docs/hazmat/backends/interfaces.rst b/docs/hazmat/backends/interfaces.rst index e6bf8f69..72b64910 100644 --- a/docs/hazmat/backends/interfaces.rst +++ b/docs/hazmat/backends/interfaces.rst @@ -212,3 +212,39 @@ A specific ``backend`` may provide one or more of these interfaces. provider. :raises ValueError: If the public_exponent is not valid. + + .. method:: create_rsa_sign_ctx(private_key, padding, algorithm) + + :param private_key: An instance of a + :class:`~cryptography.hazmat.primitives.interfaces.RSAPrivateKey` + provider. + + :param padding: An instance of a + :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricPadding` + provider. + + :param algorithm: An instance of a + :class:`~cryptography.hazmat.primitives.interfaces.HashAlgorithm` + provider. + + :returns: + :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricSignContext` + + .. method:: create_rsa_verify_ctx(public_key, signature, padding, algorithm) + + :param public_key: An instance of a + :class:`~cryptography.hazmat.primitives.interfaces.RSAPublicKey` + provider. + + :param bytes signature: The signature to verify. + + :param padding: An instance of a + :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricPadding` + provider. + + :param algorithm: An instance of a + :class:`~cryptography.hazmat.primitives.interfaces.HashAlgorithm` + provider. + + :returns: + :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricVerifyContext` -- cgit v1.2.3 From e0f0f34c0c86f1fb729404bb87d637de9a4795ce Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Mon, 17 Feb 2014 19:20:51 -0600 Subject: + docs for AsymmetricSignContext, AsymmetricVerifyContext, AsymmetricPadding --- docs/hazmat/primitives/interfaces.rst | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'docs/hazmat') diff --git a/docs/hazmat/primitives/interfaces.rst b/docs/hazmat/primitives/interfaces.rst index df17e59d..c0ddd79c 100644 --- a/docs/hazmat/primitives/interfaces.rst +++ b/docs/hazmat/primitives/interfaces.rst @@ -231,6 +231,39 @@ Asymmetric Interfaces The public exponent. Alias for :attr:`public_exponent`. +.. class:: AsymmetricSignContext + + .. versionadded:: 0.2 + + .. method:: update(data) + + :param bytes data: The data you wish to pass into the context. + + .. method:: finalize() + + :return bytes signature: The signature. + + +.. class:: AsymmetricVerifyContext + + .. versionadded:: 0.2 + + .. method:: update(data) + + :param bytes data: The data you wish to pass into the context. + + .. method:: finalize() + + :raises cryptography.exceptions.InvalidSignature: If signature does not + validate. + + +.. class:: AsymmetricPadding + + A named asymmetric padding. + + .. attribute:: name + Hash Algorithms ~~~~~~~~~~~~~~~ -- cgit v1.2.3 From 19f32d5502ec938047d3d46dc440d8fe9481caa8 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Mon, 17 Feb 2014 19:23:06 -0600 Subject: add versionadded to AsymmetricPadding --- docs/hazmat/primitives/interfaces.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/hazmat') diff --git a/docs/hazmat/primitives/interfaces.rst b/docs/hazmat/primitives/interfaces.rst index c0ddd79c..e4ae3e93 100644 --- a/docs/hazmat/primitives/interfaces.rst +++ b/docs/hazmat/primitives/interfaces.rst @@ -260,7 +260,7 @@ Asymmetric Interfaces .. class:: AsymmetricPadding - A named asymmetric padding. + .. versionadded:: 0.2 .. attribute:: name -- cgit v1.2.3 From 3292c994ba0516c59cc3e003f910a9f3c2bc0c54 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Mon, 17 Feb 2014 21:12:38 -0600 Subject: create_rsa_sign_ctx->create_rsa_signature_ctx --- docs/hazmat/backends/interfaces.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/hazmat') diff --git a/docs/hazmat/backends/interfaces.rst b/docs/hazmat/backends/interfaces.rst index 72b64910..1879336f 100644 --- a/docs/hazmat/backends/interfaces.rst +++ b/docs/hazmat/backends/interfaces.rst @@ -213,7 +213,7 @@ A specific ``backend`` may provide one or more of these interfaces. :raises ValueError: If the public_exponent is not valid. - .. method:: create_rsa_sign_ctx(private_key, padding, algorithm) + .. method:: create_rsa_signature_ctx(private_key, padding, algorithm) :param private_key: An instance of a :class:`~cryptography.hazmat.primitives.interfaces.RSAPrivateKey` -- cgit v1.2.3 From eda558ce9ffca610ee628884041832da4afb7645 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Mon, 17 Feb 2014 21:18:13 -0600 Subject: more renaming --- docs/hazmat/primitives/interfaces.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/hazmat') diff --git a/docs/hazmat/primitives/interfaces.rst b/docs/hazmat/primitives/interfaces.rst index e4ae3e93..e97f40f4 100644 --- a/docs/hazmat/primitives/interfaces.rst +++ b/docs/hazmat/primitives/interfaces.rst @@ -231,13 +231,13 @@ Asymmetric Interfaces The public exponent. Alias for :attr:`public_exponent`. -.. class:: AsymmetricSignContext +.. class:: AsymmetricSignatureContext .. versionadded:: 0.2 .. method:: update(data) - :param bytes data: The data you wish to pass into the context. + :param bytes data: The data you want to sign. .. method:: finalize() @@ -250,7 +250,7 @@ Asymmetric Interfaces .. method:: update(data) - :param bytes data: The data you wish to pass into the context. + :param bytes data: The data you wish to verify using the signature. .. method:: finalize() -- cgit v1.2.3 From dd3780a0e516b2c07e02f5b3afc02a79bfe44c6f Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Tue, 18 Feb 2014 13:17:53 -0600 Subject: some grammar fixes, rename a method or two --- docs/hazmat/backends/interfaces.rst | 10 +++++----- docs/hazmat/primitives/interfaces.rst | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'docs/hazmat') diff --git a/docs/hazmat/backends/interfaces.rst b/docs/hazmat/backends/interfaces.rst index 1879336f..c54340b6 100644 --- a/docs/hazmat/backends/interfaces.rst +++ b/docs/hazmat/backends/interfaces.rst @@ -215,11 +215,11 @@ A specific ``backend`` may provide one or more of these interfaces. .. method:: create_rsa_signature_ctx(private_key, padding, algorithm) - :param private_key: An instance of a + :param private_key: An instance of an :class:`~cryptography.hazmat.primitives.interfaces.RSAPrivateKey` provider. - :param padding: An instance of a + :param padding: An instance of an :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricPadding` provider. @@ -228,9 +228,9 @@ A specific ``backend`` may provide one or more of these interfaces. provider. :returns: - :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricSignContext` + :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricSignatureContext` - .. method:: create_rsa_verify_ctx(public_key, signature, padding, algorithm) + .. method:: create_rsa_verification_ctx(public_key, signature, padding, algorithm) :param public_key: An instance of a :class:`~cryptography.hazmat.primitives.interfaces.RSAPublicKey` @@ -238,7 +238,7 @@ A specific ``backend`` may provide one or more of these interfaces. :param bytes signature: The signature to verify. - :param padding: An instance of a + :param padding: An instance of an :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricPadding` provider. diff --git a/docs/hazmat/primitives/interfaces.rst b/docs/hazmat/primitives/interfaces.rst index e97f40f4..6fbc61b0 100644 --- a/docs/hazmat/primitives/interfaces.rst +++ b/docs/hazmat/primitives/interfaces.rst @@ -252,7 +252,7 @@ Asymmetric Interfaces :param bytes data: The data you wish to verify using the signature. - .. method:: finalize() + .. method:: verify() :raises cryptography.exceptions.InvalidSignature: If signature does not validate. -- cgit v1.2.3 From 430202dfba9a3c97abc80955752e5b9e4d430911 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Tue, 18 Feb 2014 13:36:53 -0600 Subject: let's try renaming everything I said I'd rename --- docs/hazmat/backends/interfaces.rst | 2 +- docs/hazmat/primitives/interfaces.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/hazmat') diff --git a/docs/hazmat/backends/interfaces.rst b/docs/hazmat/backends/interfaces.rst index c54340b6..bd38ed50 100644 --- a/docs/hazmat/backends/interfaces.rst +++ b/docs/hazmat/backends/interfaces.rst @@ -247,4 +247,4 @@ A specific ``backend`` may provide one or more of these interfaces. provider. :returns: - :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricVerifyContext` + :class:`~cryptography.hazmat.primitives.interfaces.AsymmetricVerificationContext` diff --git a/docs/hazmat/primitives/interfaces.rst b/docs/hazmat/primitives/interfaces.rst index 6fbc61b0..5be3dd95 100644 --- a/docs/hazmat/primitives/interfaces.rst +++ b/docs/hazmat/primitives/interfaces.rst @@ -244,7 +244,7 @@ Asymmetric Interfaces :return bytes signature: The signature. -.. class:: AsymmetricVerifyContext +.. class:: AsymmetricVerificationContext .. versionadded:: 0.2 -- cgit v1.2.3