@hv-kit/hexpress
Version:
facilitates typescript backend development with express
31 lines • 1.32 kB
TypeScript
import CryptoJS from 'crypto-js';
export declare class SHA {
hashLength: 224 | 256 | 384 | 512;
enc: 'base64' | 'hex';
constructor(hashLength?: 224 | 256 | 384 | 512, enc?: 'base64' | 'hex');
Hash(value: string, hashLength?: 224 | 256 | 384 | 512, enc?: 'base64' | 'hex'): string;
}
export declare class MD5 {
enc: 'base64' | 'hex';
constructor(enc?: 'base64' | 'hex');
Hash(value: string, enc?: 'base64' | 'hex'): string;
}
export declare class AES {
mode: any;
padding: any;
key: CryptoJS.lib.WordArray;
iv: CryptoJS.lib.WordArray;
enc: 'base64' | 'hex' | 'utf8' | 'initial';
constructor(enc?: 'base64' | 'hex' | 'utf8' | 'initial', mode?: any, padding?: any);
Encrypt(value: string | CryptoJS.lib.WordArray, enc?: 'base64' | 'hex' | 'utf8' | 'initial', mode?: any, padding?: any): string | CryptoJS.lib.CipherParams;
Decrypt(value: string | CryptoJS.lib.CipherParams, enc?: 'base64' | 'hex' | 'utf8' | 'initial', mode?: any, padding?: any): string | CryptoJS.lib.WordArray;
}
export declare function GenerateToken(data: any): string;
declare const _default: {
SHA: typeof SHA;
MD5: typeof MD5;
AES: typeof AES;
GenerateToken: typeof GenerateToken;
};
export default _default;
//# sourceMappingURL=crypto.d.ts.map