UNPKG

@starryn/crypto

Version:

basic crypto base on openssl 3.3.2

16 lines (15 loc) 761 B
import type { KeyPairWasm } from '../wasm'; import type { KeyEncoding, KeyType } from '../enum'; import { Crypto } from '../crypto'; export declare class KeyPair extends Crypto { private static getKeyEncoding; private static getKeyType; static importPublicAsync(key: Uint8Array, keyEncoding?: KeyEncoding, keyType?: KeyType): Promise<KeyPair>; static importPrivateAsync(key: Uint8Array, keyEncoding?: KeyEncoding, keyType?: KeyType): Promise<KeyPair>; private _keyPairWasm; constructor(key: KeyPairWasm); get key(): KeyPairWasm; exportPublicAsync(keyEncoding?: KeyEncoding, keyType?: KeyType): Promise<Uint8Array>; exportPrivateAsync(keyEncoding?: KeyEncoding, keyType?: KeyType): Promise<Uint8Array>; dispose(): void; }