aesCfbDecrypt(key: Uint8Array,data: Uint8Array): Uint8Array
Decrypts a body encrypted with AES-128-CFB, 128-bit segments, IV
"0123456789abcdef".
Decrypt a body
Decrypt a body
import { assertEquals } from "@std/assert"; import { aesCfbDecrypt } from "@hertzg/reolink-api/encoding/cipher"; const key = new TextEncoder().encode("08822D7143979103"); const encrypted = Uint8Array.of(0x06, 0x2c, 0x91, 0x2d, 0xd6); assertEquals(new TextDecoder().decode(aesCfbDecrypt(key, encrypted)), "hello");
key: Uint8Array
The 16-byte session key derived at login.
data: Uint8Array
The ciphertext.
The plaintext, the same length as data.