Skip to Content
SdkReactEncryptionencryptDataBatch

encryptDataBatch

encryptDataBatch(values: (string | Uint8Array<ArrayBufferLike>)[], address: string): Promise<string[]>

Defined in: src/react/useEncryption.ts:641 

Batch encrypt multiple values efficiently with a single key lookup. Much faster than calling encryptData for each value individually.

Parameters

ParameterTypeDescription

values

(string | Uint8Array<ArrayBufferLike>)[]

Array of plaintext values to encrypt

address

string

The wallet address associated with the encryption key

Returns

Promise<string[]>

Array of encrypted values as hex strings

Throws

Error if encryption key is not found in memory

Example

const encrypted = await encryptDataBatch( ["secret1", "secret2", "secret3"], walletAddress );
Last updated on