Package version:

Interface EncryptionKeyResolver

Provides an interface for key resolver for different key providers. All resolvers should implement this interface.

interface EncryptionKeyResolver {
    encryptionKeyResolverName: string;
    unwrapKey(encryptionKeyId: string, algorithm: string, wrappedKey: Uint8Array): Promise<Uint8Array>;
    wrapKey(encryptionKeyId: string, algorithm: string, unwrappedKey: Uint8Array): Promise<Uint8Array>;
}

Implemented by

Properties

encryptionKeyResolverName: string

name of the resolver to use for client side encryption. Currently only AzureKeyVault implementation is supported.

Methods

  • Unwraps the input wrapped key using the key encryption key.

    Parameters

    • encryptionKeyId: string

      Identifier of the customer managed key to be used for unwrapping.

    • algorithm: string

      Algorithm to be used for unwrapping.

    • wrappedKey: Uint8Array

      wrapped Data Encryption key.

    Returns Promise<Uint8Array>

    Unwrapped Key.

  • Wraps the input key using the key encryption key.

    Parameters

    • encryptionKeyId: string

      Identifier of the customer managed key to be used for wrapping.

    • algorithm: string

      Algorithm to be used for wrapping.

    • unwrappedKey: Uint8Array

    Returns Promise<Uint8Array>

    Wrapped key.