function wrapKey
wrapKey(
keyToWrap: CryptoKey,
wrappingKey: CryptoKey,
): Promise<string>

Wrap a symmetric key with another key using AES-GCM Returns format: wk:1:$base64iv:$base64wrapped

Parameters

keyToWrap: CryptoKey
wrappingKey: CryptoKey

Return Type

Promise<string>

Usage

import { wrapKey } from "docs/crypto.ts";