mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-03 11:54:31 +08:00
11 lines
284 B
TypeScript
11 lines
284 B
TypeScript
import * as sshpk from 'sshpk';
|
|
|
|
const cert = sshpk.parseCertificate("", "pem");
|
|
const fpr = cert.fingerprint("sha256").toString("hex");
|
|
const cn = cert.subjects[0].cn;
|
|
|
|
const certStr = cert.toString("pem");
|
|
|
|
const key = sshpk.parseKey("", "pem");
|
|
const keyStr = key.toString("pem");
|