Small change

This commit is contained in:
Jurn Wubben 2025-11-07 23:34:40 +01:00
parent 5b0c419acb
commit 6acc935609
2 changed files with 2 additions and 6 deletions

View file

@ -7,9 +7,7 @@ import {
import { Device } from "./device.ts";
function toHex(data: Uint8Array): string {
return Array.from(data).map((b) => ("00" + b.toString(16)).slice(-2)).join(
"",
);
return Array.from(data).map((b) => b.toString(16)).join("");
}
async function generateHMAC(key: string, message: string) {
const encoder = new TextEncoder();

View file

@ -82,9 +82,7 @@
<script>
function preventDefault(e) {alert(); e.preventDefault()}
function toHex(data) {
return Array.from(data).map((b) => ("00" + b.toString(16)).slice(-2)).join(
"",
);
return Array.from(data).map((b) => b.toString(16)).join("");
}
async function generateHMAC(key, message) {
const encoder = new TextEncoder();