mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-20 21:23:08 +03:00
feat(Certificate Key Parser): display public and private keys (pem)
This commit is contained in:
1 parent
2355232aed
commit
b489f3aa02
1 file changed
+10
@@ -63,6 +63,11 @@ export function getPublicKeyLabelValues(publicKey: Key) {
|
||||
value: onErrorReturnErrorMessage(() => publicKey.fingerprint('sha512')),
|
||||
multiline: true,
|
||||
},
|
||||
{
|
||||
label: 'Key (PEM):',
|
||||
value: onErrorReturnErrorMessage(() => publicKey.toString('pem')),
|
||||
multiline: true,
|
||||
},
|
||||
] as LabelValue[];
|
||||
}
|
||||
|
||||
@@ -99,6 +104,11 @@ export function getPrivateKeyLabelValues(privateKey: PrivateKey) {
|
||||
value: onErrorReturnErrorMessage(() => privateKey.fingerprint('sha512')),
|
||||
multiline: true,
|
||||
},
|
||||
{
|
||||
label: 'Key (PEM):',
|
||||
value: onErrorReturnErrorMessage(() => privateKey.toString('pem')),
|
||||
multiline: true,
|
||||
},
|
||||
] as LabelValue[];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user