bdcontract-sdk-javascript/types/crypto.d.ts

17 lines
514 B
TypeScript
Raw Normal View History

2023-03-14 17:15:57 +00:00
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;
};