Options
All
  • Public
  • Public/Protected
  • All
Menu

@azure/keyvault-keys

Package version

Index

Classes

Interfaces

Type aliases

Variables

Functions

Object literals

Type aliases

KeyWrapAlgorithm

KeyWrapAlgorithm: "A128KW" | "A192KW" | "A256KW" | "RSA-OAEP" | "RSA-OAEP-256" | "RSA1_5"

Supported algorithms for key wrapping/unwrapping

LocalSupportedAlgorithmName

LocalSupportedAlgorithmName: "RSA1_5" | "RSA-OAEP" | "PS256" | "RS256" | "PS384" | "RS384" | "PS512" | "RS512"

A union type representing the names of all of the locally supported algorithms.

ParsedWWWAuthenticate

ParsedWWWAuthenticate: {}

Type declaration

RequireAtLeastOne

RequireAtLeastOne<T>: {}[keyof T]

TypeScript fancy for making plain objects require at least one key-value pair of another set of key-values.

Type parameters

  • T

ValidParsedWWWAuthenticateProperties

ValidParsedWWWAuthenticateProperties: "authorization" | "resource" | "scope"

Variables

Const LATEST_API_VERSION

LATEST_API_VERSION: "7.1" = "7.1"

The latest supported Key Vault service API version

Const SDK_VERSION

SDK_VERSION: string = "4.2.0-beta.3"

Const logger

logger: any = createClientLogger("keyvault-keys")

The @azure/logger configuration for this package.

Functions

challengeBasedAuthenticationPolicy

  • challengeBasedAuthenticationPolicy(credential: TokenCredential): RequestPolicyFactory

checkKeyValidity

  • checkKeyValidity(keyId?: undefined | string, keyBundle?: KeyBundle): void
  • Checks whether a key can be used at that specific moment, by comparing the current date with the bundle's notBefore and expires values.

    Parameters

    • Optional keyId: undefined | string
    • Optional keyBundle: KeyBundle

    Returns void

convertJWKtoPEM

createHash

  • createHash(algorithm: string, data: Uint8Array): Promise<Buffer>

createSpan

  • createSpan(methodName: string, requestOptions?: RequestOptionsBase): Span
  • Creates a span using the tracer that was set by the user

    Parameters

    • methodName: string

      The name of the method creating the span.

    • Default value requestOptions: RequestOptionsBase = {}

    Returns Span

encodeBuffer

  • encodeBuffer(buffer: Uint8Array, bufferId: number): Uint8Array

encodeLength

  • encodeLength(length: number): Uint8Array

formatBase64Sequence

  • formatBase64Sequence(base64Sequence: string): string
  • Fill in the PEM with 64 character lines as per RFC:

    "To represent the encapsulated text of a PEM message, the encoding function's output is delimited into text lines (using local conventions), with each line except the last containing exactly 64 printable characters and the final line containing 64 or fewer printable characters."

    Parameters

    • base64Sequence: string

    Returns string

getKeyFromKeyBundle

makeSequence

  • makeSequence(encodedParts: Uint8Array[]): string

Const makeSigner

  • makeSigner(signAlgorithm: SignAlgorithmName): LocalSupportedAlgorithm
  • Since sign algorithms behave almost the same, we're making a generator to save up code. We receive the sign algorithm, from the list of names in SignAlgorithmName, then we generate a LocalSupportedAlgorithm that only create hashes and verifies signatures.

    Parameters

    • signAlgorithm: SignAlgorithmName

    Returns LocalSupportedAlgorithm

parseKeyVaultKeyId

  • Parses the given Key Vault Key Id. An example is:

    https://.vault.azure.net/keys//

    On parsing the above Id, this function returns:

      {
         sourceId: "https://<keyvault-name>.vault.azure.net/keys/<key-name>/<unique-version-id>",
         vaultUrl: "https://<keyvault-name>.vault.azure.net",
         version: "<unique-version-id>",
         name: "<key-name>"
      }
    internal

    Parameters

    • id: string

      The Id of the Key Vault Key.

    Returns KeyVaultKeyId

parseKeyvaultIdentifier

parseWWWAuthenticate

  • Parses an WWW-Authenticate response. This transforms a string value like: Bearer authorization="some_authorization", resource="https://some.url" into an object like: { authorization: "some_authorization", resource: "https://some.url" }

    Parameters

    • wwwAuthenticate: string

      String value in the WWW-Authenticate header

    Returns ParsedWWWAuthenticate

runOperation

setParentSpan

  • setParentSpan(span: Span, options?: RequestOptionsBase): RequestOptionsBase
  • Returns updated HTTP options with the given span as the parent of future spans, if applicable.

    Parameters

    • span: Span

      The span for the current operation.

    • Default value options: RequestOptionsBase = {}

      The options for the underlying HTTP request.

    Returns RequestOptionsBase

Object literals

Const assertions

assertions: object
internal

The list of known assertions so far. Assertions verify that the requirements to execute a local cryptography operation are met.

internal

The list of known assertions so far. Assertions verify that the requirements to execute a local cryptography operation are met.

keyOps

  • keyOps(key?: JsonWebKey, operationName?: LocalCryptographyOperationName): void

nodeOnly

  • nodeOnly(): void

rsa

Generated using TypeDoc