( unparsedKey: string | Buffer<ArrayBufferLike>, passphrase?: string )
| 12 | // A helper function which can be used to parse string formatted keys to |
| 13 | // KeyObjects. |
| 14 | export function parsePemKey( |
| 15 | unparsedKey: string | Buffer<ArrayBufferLike>, |
| 16 | passphrase?: string |
| 17 | ): KeyObject { |
| 18 | return crypto.createPrivateKey({ |
| 19 | key: unparsedKey, |
| 20 | passphrase, |
| 21 | }); |
| 22 | } |
| 23 | |
| 24 | function maybeGetSignatureType(key: crypto.KeyObject): SignatureType | null { |
| 25 | switch (key.asymmetricKeyType) { |
no outgoing calls
no test coverage detected