UNPKG

@microsoft/dev-tunnels-ssh

Version:
45 lines 1.91 kB
/// <reference types="node" /> import { Buffer } from 'buffer'; import { PublicKeyAlgorithm, KeyPair, ECParameters } from '../publicKeyAlgorithm'; import { Signer, Verifier } from '../hmacAlgorithm'; import { ECCurve } from '../ecdsaCurves'; declare class NodeECDsaKeyPair implements KeyPair { private algorithm; /** * Constructs a new ECDSA key pair object. * * @param algorithmName Key pair algorithm name. If unspecified, the key pair object must be * initialized before use via `importParameters()`. */ constructor(algorithmName?: string); get hasPublicKey(): boolean; get hasPrivateKey(): boolean; comment: string | null; get keyAlgorithmName(): string; get algorithmName(): string; set algorithmName(value: string); generate(): Promise<void>; private generateNodeKeyPairObjects; private generateNodeKeyPairBuffers; private generateExternalKeyPair; setPublicKeyBytes(keyBytes: Buffer, algorithmName?: string): Promise<void>; getPublicKeyBytes(algorithmName?: string): Promise<Buffer | null>; importParameters(parameters: ECParameters): Promise<void>; exportParameters(): Promise<ECParameters>; dispose(): void; } export declare class NodeECDsa extends PublicKeyAlgorithm { static readonly ecdsaSha2Nistp256 = "ecdsa-sha2-nistp256"; static readonly ecdsaSha2Nistp384 = "ecdsa-sha2-nistp384"; static readonly ecdsaSha2Nistp521 = "ecdsa-sha2-nistp521"; constructor(name: string, hashAlgorithmName: string); static curves: ECCurve[]; createKeyPair(): KeyPair; generateKeyPair(): Promise<KeyPair>; createSigner(keyPair: KeyPair): Signer; createVerifier(keyPair: KeyPair): Verifier; private static convertHashAlgorithmName; static readonly KeyPair: typeof NodeECDsaKeyPair; } export {}; //# sourceMappingURL=nodeECDsa.d.ts.map