Skip to content

Commit d476db9

Browse files
authored
[KeyVault] Add createOctKey convenience method and relevant options. (Azure#13522)
## What - Add `createOctKey` method to support creating keys of type `oct` and `oct-HSM` - Add `createOctKeyOptions` supporting `hsm` (keySize is already supported at the `createKeyOptions` interface) ## Why - This adds the same convenience layer we have for createEcKey, createRsaKey, etc....
1 parent 139774f commit d476db9

File tree

7 files changed

+417
-3
lines changed

7 files changed

+417
-3
lines changed

sdk/keyvault/keyvault-keys/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- Added a constructor overload to `CryptographyClient` that takes a `JsonWebKey` and allows for local-only subset of operations.
99
- Added `KeyId` to the public API of CryptographyClient.
1010
- Removed `parseKeyVaultKeysId` from the public API and made `KeyOptionsOptions.additionalAuthenticatedData` a readonly property.
11+
- Added a `createOctKey` convenience method to create a key of type `oct` or `oct-HSM` as appropriate.
1112

1213
## 4.2.0-beta.2 (2020-10-06)
1314

sdk/keyvault/keyvault-keys/recordings/browsers/keys_client__create_read_update_and_delete_operations/recording_can_create_an_oct_key_with_options.json

Lines changed: 146 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/keyvault/keyvault-keys/recordings/node/keys_client__create_read_update_and_delete_operations/recording_can_create_an_oct_key_with_options.js

Lines changed: 178 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/keyvault/keyvault-keys/review/keyvault-keys.api.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ export interface CreateKeyOptions extends coreHttp.OperationOptions {
4242
};
4343
}
4444

45+
// @public
46+
export interface CreateOctKeyOptions extends CreateKeyOptions {
47+
hsm?: boolean;
48+
}
49+
4550
// @public
4651
export interface CreateRsaKeyOptions extends CreateKeyOptions {
4752
hsm?: boolean;
@@ -163,6 +168,7 @@ export class KeyClient {
163168
beginRecoverDeletedKey(name: string, options?: BeginRecoverDeletedKeyOptions): Promise<PollerLike<PollOperationState<DeletedKey>, DeletedKey>>;
164169
createEcKey(name: string, options?: CreateEcKeyOptions): Promise<KeyVaultKey>;
165170
createKey(name: string, keyType: KeyType, options?: CreateKeyOptions): Promise<KeyVaultKey>;
171+
createOctKey(name: string, options?: CreateOctKeyOptions): Promise<KeyVaultKey>;
166172
createRsaKey(name: string, options?: CreateRsaKeyOptions): Promise<KeyVaultKey>;
167173
getDeletedKey(name: string, options?: GetDeletedKeyOptions): Promise<DeletedKey>;
168174
getKey(name: string, options?: GetKeyOptions): Promise<KeyVaultKey>;

0 commit comments

Comments
 (0)