From 5f2896474acb098f320f14eed3669a3b177b5554 Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Mon, 10 Aug 2020 16:31:22 -0400 Subject: [PATCH 1/2] doc changes --- sdk/keyvault/azure-keyvault-keys/README.md | 2 +- .../azure-keyvault-keys/azure/keyvault/keys/crypto/_client.py | 4 ++-- .../azure/keyvault/keys/crypto/aio/_client.py | 4 ++-- .../azure/keyvault/secrets/aio/_client.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-keys/README.md b/sdk/keyvault/azure-keyvault-keys/README.md index 1ad7a1dbeacf..5fa94dc08f9a 100644 --- a/sdk/keyvault/azure-keyvault-keys/README.md +++ b/sdk/keyvault/azure-keyvault-keys/README.md @@ -151,9 +151,9 @@ This section contains code snippets covering common tasks: * [Update an existing Key](#update-an-existing-key "Update an existing Key") * [Delete a Key](#delete-a-key "Delete a Key") * [List Keys](#list-keys "List Keys") +* [Perform cryptographic operations](#cryptographic-operations) * [Asynchronously create a Key](#asynchronously-create-a-key "Asynchronously create a Key") * [Asynchronously list Keys](#asynchronously-list-keys "Asynchronously list Keys") -* [Perform cryptographic operations](#cryptographic-operations) ### Create a Key [create_rsa_key](https://aka.ms/azsdk/python/keyvault-keys/docs#azure.keyvault.keys.KeyClient.create_rsa_key) and diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/_client.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/_client.py index 648a892c0a72..34436ca6a364 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/_client.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/_client.py @@ -393,8 +393,8 @@ def verify(self, algorithm, digest, signature, **kwargs): :param algorithm: verification algorithm :type algorithm: :class:`~azure.keyvault.keys.crypto.SignatureAlgorithm` - :param bytes digest: - :param bytes signature: + :param bytes digest: the signed bytes to verify + :param bytes signature: the signature we are verifying :rtype: :class:`~azure.keyvault.keys.crypto.VerifyResult` Example: diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/aio/_client.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/aio/_client.py index 6c1b31ef5754..4ed4481fca6d 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/aio/_client.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/aio/_client.py @@ -344,8 +344,8 @@ async def verify( :param algorithm: verification algorithm :type algorithm: :class:`~azure.keyvault.keys.crypto.SignatureAlgorithm` - :param bytes digest: - :param bytes signature: + :param bytes digest: the signed bytes to verify + :param bytes signature: the signature we are verifying :rtype: :class:`~azure.keyvault.keys.crypto.VerifyResult` Example: diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py index 3f2b49b14302..0ae4b19f52ea 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/aio/_client.py @@ -224,7 +224,7 @@ async def backup_secret(self, name: str, **kwargs: "Any") -> bytes: :class:`~azure.core.exceptions.ResourceNotFoundError` if the secret doesn't exist, :class:`~azure.core.exceptions.HttpResponseError` for other errors - Example: + Example: .. literalinclude:: ../tests/test_samples_secrets_async.py :start-after: [START backup_secret] :end-before: [END backup_secret] From c50443ba0d66eecc833eec3491afef18b6fbef3c Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Mon, 10 Aug 2020 16:58:43 -0400 Subject: [PATCH 2/2] implementing charles' suggestion for param descriptions --- .../azure/keyvault/keys/crypto/_client.py | 5 +++-- .../azure/keyvault/keys/crypto/aio/_client.py | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/_client.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/_client.py index 34436ca6a364..dc65525215f0 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/_client.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/_client.py @@ -393,8 +393,9 @@ def verify(self, algorithm, digest, signature, **kwargs): :param algorithm: verification algorithm :type algorithm: :class:`~azure.keyvault.keys.crypto.SignatureAlgorithm` - :param bytes digest: the signed bytes to verify - :param bytes signature: the signature we are verifying + :param bytes digest: Pre-hashed digest corresponding to **signature**. The hash algorithm used must be + compatible with **algorithm**. + :param bytes signature: signature to verify :rtype: :class:`~azure.keyvault.keys.crypto.VerifyResult` Example: diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/aio/_client.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/aio/_client.py index 4ed4481fca6d..ffd4966412bc 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/aio/_client.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/aio/_client.py @@ -344,8 +344,9 @@ async def verify( :param algorithm: verification algorithm :type algorithm: :class:`~azure.keyvault.keys.crypto.SignatureAlgorithm` - :param bytes digest: the signed bytes to verify - :param bytes signature: the signature we are verifying + :param bytes digest: Pre-hashed digest corresponding to **signature**. The hash algorithm used must be + compatible with **algorithm**. + :param bytes signature: signature to verify :rtype: :class:`~azure.keyvault.keys.crypto.VerifyResult` Example: