export interface CreateKeyOptions { /** * 密钥类型 * @default rsa2 */ type?: 'rsa2' | 'rsa'; /** * 密钥格式 * @default pkcs8 */ scheme?: 'pkcs8' | 'pkcs1'; /** * 公钥保存地址 */ pubPath?: string; /** * 私钥保存地址 */ priPath?: string; } export interface CreateKeyResult { /** * 私钥 */ privateKey?: string; /** * 公钥 */ publicKey?: string; /** * 私钥, 兼容 alipaydev 之前的返回 */ privatePem?: string; /** * 公钥, 兼容 alipaydev 之前的返回 */ publicPem?: string; } /** * 生成密钥 */ export declare function createKey(options?: CreateKeyOptions): Promise; /** * 密钥匹配检测 */ export declare function matchKey(options: CreateKeyResult): boolean; export interface ConvertKeyOptions { /** * 密钥格式 * @default pkcs8 */ scheme: 'pkcs8' | 'pkcs1'; /** * 私钥地址 */ priPath: string; } /** * 密钥转换 */ export declare function convertKey(options: ConvertKeyOptions): Promise;