@microsoft/dev-tunnels-ssh-keys
Version:
SSH key import/export library for Dev Tunnels
31 lines • 1.04 kB
TypeScript
/// <reference types="node" />
/**
* Encapsulates formatted (serialized) key data and metadata.
*/
export declare class KeyData {
/**
* The key type; the use of this property depends on the encoding. In PEM encoding,
* the key type is in the BEGIN and END markers.
*/
keyType: string;
/**
* Optional headers containing key metadata. In PEM encoding, the headers appear in
* plaintext before the base64-encoded key.
*/
headers: Map<string, string>;
/**
* Formatted key bytes.
*/
data: Buffer;
private static readonly beginRegex;
private static readonly endRegex;
private static readonly headerRegex;
constructor(keyType?: string, data?: Buffer);
static tryDecodePem(input: string): KeyData | null;
static tryDecodePemBytes(input: Buffer): KeyData | null;
encodePem(): string;
encodePemBytes(): Buffer;
encodeSshPublicKey(): string;
encodeSshPublicKeyBytes(): Buffer;
}
//# sourceMappingURL=keyData.d.ts.map