UNPKG

iking-utils-test

Version:

金合前端工具库(1.2.9版本之后需要注册KEY)

26 lines (25 loc) 818 B
import * as Cryptojs from 'crypto-js'; export interface EncryptionParams { key: string; iv: string; } interface Padding { pad(data: Cryptojs.lib.WordArray, blockSize: number): void; unpad(data: Cryptojs.lib.WordArray): void; } export declare class AesEncryption { private key; private iv; constructor(opt?: Partial<EncryptionParams>); get getOptions(): { mode: any; padding: Padding; iv: Cryptojs.lib.WordArray | undefined; }; encryptByAES(cipherText: string): string; decryptByAES(cipherText: string): string; } export declare function encryptByBase64(cipherText: string): string; export declare function decodeByBase64(cipherText: string): string; export declare function encryptByMd5(password: string): string; export {};