Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Key Vault] Add EncryptParameters analog in Python #16840

Closed
wants to merge 4 commits into from

Conversation

mccoyp
Copy link
Member

@mccoyp mccoyp commented Feb 20, 2021

Adds EncryptionAlgorithmConfiguration and DecryptionAlgorithmConfiguration classes, which are accepted as an algorithm argument in encrypt and decrypt, respectively, to lead users to provide appropriate arguments to encryption algorithms.

@mccoyp mccoyp added KeyVault Client This issue points to a problem in the data-plane of the library. labels Feb 20, 2021
@mccoyp mccoyp added this to the [2021] March milestone Feb 20, 2021
@mccoyp mccoyp requested a review from chlowell February 20, 2021 01:35
def __init__(self, algorithm, **kwargs):
self.algorithm = algorithm
self.iv = kwargs.pop("iv", None)
self.additional_authenticated_data = kwargs.pop("additional_authenticated_data", None)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question here: it's easy to imagine a user using these constructors directly. In that case, should we use the argument validation helper from _client.py in __init__? We could also validate arguments during calls to encrypt/decrypt like we do when an EncryptionAlgorithm is provided, but that wouldn't give us the chance to raise an error when the configuration is defined.

@mccoyp mccoyp removed this from the [2021] March milestone Mar 9, 2021
@mccoyp mccoyp closed this Jun 17, 2021
@mccoyp mccoyp deleted the encryptparams branch June 17, 2021 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. KeyVault
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant