ntqq
Version:
QQ protocol for NodeJS!
18 lines (17 loc) • 700 B
TypeScript
import { BinaryLike } from "crypto";
/**
* DES 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 empty
* @return {Buffer} The encrypted data
*/
export declare function desEncrypt(data: BinaryLike, key: string | Buffer, iv?: Buffer): Buffer;
/**
* DES decryption
* @param data {ArrayBufferView} The data to decrypt
* @param key {string|Buffer} The key to decrypt
* @param iv {string|Buffer} The iv to decrypt,default is empty
* @return {Buffer} The decrypted data
*/
export declare function desDecrypt(data: NodeJS.ArrayBufferView, key: string | Buffer, iv?: Buffer): Buffer;