Skip to content

Commit

Permalink
[KeyVault] - Remove LocalSupportedAlgorithmName (#14676)
Browse files Browse the repository at this point in the history
This PR removes LocalSupportedAlgorithmName. It is no longer used internally and not needed for customers, so this removes it from the public API and the codebase.
  • Loading branch information
maorleger authored Apr 2, 2021
1 parent e833b14 commit ad31d2a
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 26 deletions.
1 change: 1 addition & 0 deletions sdk/keyvault/keyvault-keys/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- If a traced operation throws an exception we will now properly record the exception message in the tracing span.
- Finally, naming conventions have been standardized across the KeyVault libraries taking the format of `Azure.KeyVault.<PACKAGE NAME>.<CLIENT NAME>`.
- Fixed an issue where retrying a failed initial Key Vault request may result in an empty body.
- [Breaking] Removed the now unused `LocalCryptographyAlgorithmName` type (Added in 4.2.0-beta.1 to support `LocalCryptographyClient` and unused since 4.2.0-beta.4)

## 4.2.0-beta.4 (2021-03-09)

Expand Down
3 changes: 0 additions & 3 deletions sdk/keyvault/keyvault-keys/review/keyvault-keys.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -380,9 +380,6 @@ export interface ListPropertiesOfKeysOptions extends coreHttp.OperationOptions {
export interface ListPropertiesOfKeyVersionsOptions extends coreHttp.OperationOptions {
}

// @public
export type LocalSupportedAlgorithmName = "RSA1_5" | "RSA-OAEP" | "PS256" | "RS256" | "PS384" | "RS384" | "PS512" | "RS512";

// @public
export const logger: import("@azure/logger").AzureLogger;

Expand Down
13 changes: 0 additions & 13 deletions sdk/keyvault/keyvault-keys/src/cryptography/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,6 @@ import {
WrapResult
} from "..";

/**
* A union type representing the names of all of the locally supported algorithms.
*/
export type LocalSupportedAlgorithmName =
| "RSA1_5"
| "RSA-OAEP"
| "PS256"
| "RS256"
| "PS384"
| "RS384"
| "PS512"
| "RS512";

export class LocalCryptographyUnsupportedError extends Error {}

/**
Expand Down
2 changes: 0 additions & 2 deletions sdk/keyvault/keyvault-keys/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ import {
} from "./cryptographyClientModels";

import { parseKeyVaultKeyId, KeyVaultKeyId } from "./identifier";
import { LocalSupportedAlgorithmName } from "./cryptography/models";
import { getKeyFromKeyBundle } from "./transformations";
import { createTraceFunction } from "../../keyvault-common/src";

Expand Down Expand Up @@ -157,7 +156,6 @@ export {
ListPropertiesOfKeysOptions,
ListPropertiesOfKeyVersionsOptions,
ListDeletedKeysOptions,
LocalSupportedAlgorithmName,
PageSettings,
PagedAsyncIterableIterator,
KeyVaultKeyId,
Expand Down
10 changes: 2 additions & 8 deletions sdk/keyvault/keyvault-keys/test/public/localCryptography.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@
// Licensed under the MIT license.

import { Context } from "mocha";
import {
LocalSupportedAlgorithmName,
KeyClient,
CryptographyClient,
SignatureAlgorithm,
KeyVaultKey
} from "../../src";
import { KeyClient, CryptographyClient, SignatureAlgorithm, KeyVaultKey } from "../../src";
import * as chai from "chai";
import chaiAsPromised from "chai-as-promised";
chai.use(chaiAsPromised);
Expand Down Expand Up @@ -213,7 +207,7 @@ describe("Local cryptography public tests", () => {
// Local Cryptography Client part
const localCryptoClient = new CryptographyClient(keyVaultKey.key!);
const verifyResult = await localCryptoClient.verifyData(
localAlgorithmName as LocalSupportedAlgorithmName,
localAlgorithmName,
digest,
signature.result
);
Expand Down

0 comments on commit ad31d2a

Please sign in to comment.