Template
1
0

feat: biome check

This commit is contained in:
2025-09-25 14:29:15 +02:00
parent f2ba21a7e3
commit 0819534901
68 changed files with 211 additions and 802 deletions

View File

@@ -46,6 +46,9 @@ function bufferToHex(buffer: ArrayBuffer): string {
}
function hexToBuffer(hex: string): ArrayBuffer {
const bytes = new Uint8Array(hex.match(/.{1,2}/g)!.map((byte) => parseInt(byte, 16)));
return bytes.buffer;
const match = hex.match(/.{1,2}/g);
if (match === null) {
return new Uint8Array().buffer;
}
return new Uint8Array(match.map((byte) => parseInt(byte, 16))).buffer;
}

View File

@@ -7,4 +7,4 @@
"jose": "6.1.0",
"nanoid": "5.1.5"
}
}
}

View File

@@ -1,6 +1,13 @@
import * as Jose from "jose";
import { createKeyPair, ExportedKeyPair, importPrivateKey, importPublicKey, KeyPair, loadKeyPair } from "./key-pair.ts";
import {
createKeyPair,
type ExportedKeyPair,
importPrivateKey,
importPublicKey,
type KeyPair,
loadKeyPair,
} from "./key-pair.ts";
/*
|--------------------------------------------------------------------------------