@perfylee/crypto
Version:
encryption module used in project
43 lines (42 loc) • 925 B
TypeScript
/**
* MD5加密
* @param input 原文
* @returns 字母小写
*/
export declare const md5: (input: string) => string;
/**
* TripleDES加解密
*/
export declare const tripleDES: {
/**
* 加密
* @param input 原文
* @param key 密钥(长度24的字符串的base64编码)
* @returns 字母小写
*/
encrypt: (input: string, key: string) => string;
/**
* 解密
* @param input 密文
* @param key 密钥(长度24的字符串的base64编码)
* @returns
*/
decrypt: (input: string, key: string) => string;
};
/**
* Base64
*/
export declare const base64: {
/**
* 编码
* @param input 原文
* @returns 字母小写
*/
parse: (input: string) => string;
/**
* 解码
* @param input Base64密文
* @returns
*/
stringify: (input: string) => string;
};