UNPKG

@microsoft/dev-tunnels-ssh

Version:
45 lines 1.88 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 WebECDsaKeyPair 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>; setPublicKeyBytes(keyBytes: Buffer, algorithmName?: string): Promise<void>; getPublicKeyBytes(algorithmName?: string | undefined): Promise<Buffer | null>; importParameters(parameters: ECParameters): Promise<void>; exportParameters(): Promise<ECParameters>; dispose(): void; } export declare class WebECDsa 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 WebECDsaKeyPair; } export declare namespace WebECDsa { type KeyPair = WebECDsaKeyPair; } export {}; //# sourceMappingURL=webECDsa.d.ts.map