declare class Encryptor { protected appId: string; protected token: string; protected aesKey: string | Buffer; protected receiveId: string; protected blockSize: number; constructor(appId?: string, token?: string, aesKey?: string | Buffer, receiveId?: string); /** * 获取配置的token * @returns */ getToken(): string; /** * 计算消息签名 * @param args * @returns */ createSignature(...args: any[]): string; /** * 加密 * @param text * @param nonce * @param timestamp * @returns */ encrypt(text: string, nonce?: string, timestamp?: number): string; /** * 解密 * @param text * @param msgSignature * @param nonce * @param timestamp * @returns */ decrypt(text: string, msgSignature: string, nonce: string, timestamp: number): string; } export = Encryptor;