loginCredentials(options: LoginCredentialsOptions): LoginCredentials
Derives the hashed credentials and the AES session key from a nonce.
Derive the session key
Derive the session key
import { assertEquals } from "@std/assert"; import { loginCredentials } from "@hertzg/reolink-api/protocol/login"; const { aesKey } = loginCredentials({ username: "admin", password: "hunter2", nonce: "NONCE-0123", }); assertEquals(new TextDecoder().decode(aesKey), "08822D7143979103");
options: LoginCredentialsOptions
The user name, password and nonce.
The hashes for loginXml and the AES key for the session.