Class EncryptUtil

CryptoES 加密库封装 https://github.com/entronad/crypto-es

安装第三方库生效 npm install -g yarn yarn add crypto-es

Hierarchy

  • EncryptUtil

Constructors

Properties

JsonFormatter: {
    parse: ((jsonStr: any) => CipherParams);
    stringify: ((cipherParams: any) => string);
} = ...

Type declaration

  • parse: ((jsonStr: any) => CipherParams)
      • (jsonStr: any): CipherParams
      • Parameters

        • jsonStr: any

        Returns CipherParams

  • stringify: ((cipherParams: any) => string)
      • (cipherParams: any): string
      • Parameters

        • cipherParams: any

        Returns string

iv: WordArray = ...
key: string = ...

Methods

  • AES 解密

    Parameters

    • str: string

      解密字符串

    • key: string

      aes加密的key

    • iv: string

      aes加密的iv

    Returns string

  • AES 加密

    Parameters

    • msg: string

      加密信息

    • key: string

      aes加密的key

    • iv: string

      aes加密的iv

    Returns string

  • 初始化加密库

    Parameters

    • key: string
    • iv: string

    Returns void

  • MD5加密

    Parameters

    • msg: string

      加密信息

    Returns string

Generated using TypeDoc