encryptDataWithKey
encryptDataWithKey(
plaintext:string|Uint8Array<ArrayBufferLike>,key:CryptoKey):Promise<string>
Defined in: src/react/useEncryption.ts:555Â
Internal
Encrypts data using a pre-fetched CryptoKey. Use this for batch operations to avoid repeated key lookups.
Parameters
| Parameter | Type | Description |
|---|---|---|
|
|
|
The data to encrypt (string or Uint8Array) |
|
|
|
The CryptoKey for AES-GCM encryption |
Returns
Promise<string>
Encrypted data as hex string (IV + ciphertext + auth tag)
Last updated on