function aesCfbDecrypt
aesCfbDecrypt(): Uint8Array

Decrypts a body encrypted with AES-128-CFB, 128-bit segments, IV "0123456789abcdef".

Examples

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");

Parameters

The 16-byte session key derived at login.

The ciphertext.

Return Type

The plaintext, the same length as data.

Usage

import { aesCfbDecrypt } from "encoding/cipher.ts";