export type TKeyFormat = 'raw' | 'pkcs8' | 'spki'; export default class Ecdh { publicKey: string; privateKey: string; iv: string; __privateCryptoKey: CryptoKey | undefined; __sharedSecret: CryptoKey | undefined; __curve: string; __keyFormat: TKeyFormat; __subtle: SubtleCrypto; constructor(curve?: string, keyFormat?: TKeyFormat); generateKeys(): Promise; exportKey(cryptoKey: CryptoKey, keyFormat?: TKeyFormat): Promise; importKey(keyBase64: string, keyFormat?: TKeyFormat, usages?: KeyUsage[]): Promise; setPrivateKey(privateBase64: string): Promise; deriveSharedSecret(publicKeyBase64: string, iv?: string): Promise; deriveSharedBits(publicKeyBase64: string): Promise; deriveShareBase64(publicKeyBase64: string): Promise; encode(data: string, iv?: string): Promise; encodeiv(data: string, iv?: string, ivFirst?: boolean): Promise; decode(encrypted: string, iv?: string): Promise; decodeiv(encrypted: string, ivFirst?: boolean): Promise; }