-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 Keys] Add new algorithms #11380
Conversation
@@ -737,33 +742,3 @@ export class CryptographyClient { | |||
} | |||
} | |||
} | |||
|
|||
/** | |||
* Options for {@link encrypt}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved these from this file to the models file. It made more sense to me.
@@ -137,3 +154,52 @@ export interface VerifyResult { | |||
*/ | |||
keyID?: string; | |||
} | |||
|
|||
/** | |||
* Common optional properties for encrypt, decrypt, wrap and unwrap. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved these from this file to the models file. It made more sense to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to rename a member, but otherwise LGTM.
@@ -184,6 +184,13 @@ export type KeyCurveName = "P-256" | "P-384" | "P-521" | "P-256K"; | |||
// @public | |||
export type KeyOperation = "encrypt" | "decrypt" | "sign" | "verify" | "wrapKey" | "unwrapKey" | "import"; | |||
|
|||
// @public | |||
export interface KeyOperationsOptions extends CryptographyOptions { | |||
aad?: Uint8Array; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be additionalAuthenticatedData
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
additionalAuthenticatedData
is way better! Thank you!
@heaths thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two small comments
@@ -107,6 +107,7 @@ describe("CryptographyClient (all decrypts happen remotely)", () => { | |||
const hash = createHash("sha256"); | |||
hash.update(signatureValue); | |||
const digest = hash.digest(); | |||
console.log({ digest }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems like something not meant to be left in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh my bad, thank you!
@@ -148,6 +153,10 @@ export class CryptographyClient { | |||
} | |||
} | |||
|
|||
// Renaming parameters | |||
|
|||
requestOptions.aad = options.additionalAuthenticatedData; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we have to do this? Feels like a swagger transform could make the generated client take the better name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I'll try with something like this: https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/textanalytics/ai-text-analytics/swagger/README.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! LGTM
* [Key Vault Keys] Add new algorithms * seems like this was necessary. Not sure how I didnt catch it before * Renamed aad as additionalAuthenticatedData * formatting * this seems better * API changes after recent feedback * lint fix * swagger property rename WIP * generated changes * removed console.log
This PR only adds the new algorithms from v7.2.
I'll add the tests as part of another PR. I'll keep track of that through this issue: #11396
Closes: #11260