ntqq
Version:
QQ protocol for NodeJS!
18 lines (17 loc) • 758 B
TypeScript
import { BinaryLike } from "crypto";
/**
* AES encryption
* @param data {BinaryLike} The data to encrypt
* @param key {string|Buffer} The key to encrypt
* @param iv {string|Buffer} The iv to encrypt,default is key.slice(0,16)
* @return {Buffer} The encrypted data
*/
export declare function aesEncrypt(data: BinaryLike, key: string | Buffer, iv?: string | Buffer): Buffer;
/**
* AES decryption
* @param encryptedData {ArrayBufferView} The data to decrypt
* @param key {string|Buffer} The key to decrypt
* @param iv {string|Buffer} The iv to decrypt, default is key.slice(0,16)
* @return {Buffer} The decrypted data
*/
export declare function aesDecrypt(encryptedData: NodeJS.ArrayBufferView, key: string | Buffer, iv?: string | Buffer): Buffer;