Small change
This commit is contained in:
parent
5b0c419acb
commit
6acc935609
2 changed files with 2 additions and 6 deletions
|
|
@ -7,9 +7,7 @@ import {
|
||||||
import { Device } from "./device.ts";
|
import { Device } from "./device.ts";
|
||||||
|
|
||||||
function toHex(data: Uint8Array): string {
|
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) {
|
async function generateHMAC(key: string, message: string) {
|
||||||
const encoder = new TextEncoder();
|
const encoder = new TextEncoder();
|
||||||
|
|
|
||||||
|
|
@ -82,9 +82,7 @@
|
||||||
<script>
|
<script>
|
||||||
function preventDefault(e) {alert(); e.preventDefault()}
|
function preventDefault(e) {alert(); e.preventDefault()}
|
||||||
function toHex(data) {
|
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) {
|
async function generateHMAC(key, message) {
|
||||||
const encoder = new TextEncoder();
|
const encoder = new TextEncoder();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue