decryptDataBytesFromBytes
decryptDataBytesFromBytes(
encrypted:Uint8Array,address:string,version:EncryptionKeyVersion):Promise<Uint8Array<ArrayBufferLike>>
Defined in: src/react/useEncryption.ts:638
Like decryptDataBytes but takes the raw encrypted bytes
([IV][ciphertext+tag]) directly instead of a hex string. Skips the
hexToBytes conversion — for large binary media the hex string the caller
would otherwise build is a ~1.37x copy of the whole payload (a ~1GB string
for a 500MB video), plus this avoids a second byte copy. Same key resolution
as decryptDataBytes.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
|
|
|
|
Raw encrypted bytes (IV + ciphertext + auth tag), no hex |
|
|
|
|
The wallet address associated with the encryption key |
|
|
|
Encryption key version to decrypt with (defaults to “v3”) |
Returns
Promise<Uint8Array<ArrayBufferLike>>
Decrypted data as Uint8Array