feat: update publickey.ts

This commit is contained in:
2025-01-19 01:12:37 +08:00
parent 52ffab9f2b
commit ab9edbb4fd
3 changed files with 8 additions and 7 deletions

View File

@@ -21,7 +21,8 @@ if (Deno.args.length === 0) {
// console.log(x509.publicKey.export({format: "pem", type: "spki"}));
// }
function printPublicKey(publicKey) {
// deno-lint-ignore no-explicit-any
function printPublicKey(publicKey: any) {
console.log('JWK:');
const exportedJwk = publicKey.export({format: "jwk"});
console.log(JSON.stringify(exportedJwk, null, 4));
@@ -42,7 +43,7 @@ try {
const publicKey = createPublicKey({key, format: "jwk"});
printPublicKey(publicKey);
Deno.exit(0);
} catch (e) {
} catch (_e) {
// IGNORE
}