bdcontract-sdk-javascript/types/crypto.d.ts
2023-03-15 01:15:57 +08:00

17 lines
514 B
TypeScript

import type { AESKey } from '@daotl/cryptico';
import { RSAKey } from '@daotl/cryptico';
export declare function aesEncrypt(data: string, aesKey: AESKey): string;
export declare function rsaEncrypt(data: string, rsaKey: {
n: string;
e1: string;
}): string;
export declare function loadRSAKey(rsaKey: string): RSAKey;
export declare function encryptReq(reqContent: {
contractID: string;
}, pubKey: RSAKey): {
action: string | null;
contractID: string;
arg: string;
requester: string;
};