gmkitx API - v0.10.1
    正在准备搜索索引...

    变量 zucDecrypt常量

    zucDecrypt: (
        key: BytesLike,
        iv: BytesLike,
        ciphertext: BytesLike,
        options?: ZUCDecryptOptions,
    ) => string = zucFunctions.decrypt

    使用 ZUC-128 解密为 UTF-8 文本;二进制明文应使用 zucDecryptBytes

    类型声明

      • (
            key: BytesLike,
            iv: BytesLike,
            ciphertext: BytesLike,
            options?: ZUCDecryptOptions,
        ): string
      • 使用 ZUC-128 流密码解密数据

        参数

        • key: BytesLike

          128-bit key (16 bytes or 32 hex chars) / 128 位密钥

        • iv: BytesLike

          128-bit IV (16 bytes or 32 hex chars) / 128 位初始向量

        • ciphertext: BytesLike

          Encrypted data (hex or base64 string, auto-detected) / 加密的数据(十六进制或 base64,自动检测)

        • 可选options: ZUCDecryptOptions

          字符串输入编码;省略时优先识别 Hex,再识别 Base64

        返回 string

        Decrypted data as string / 解密后的数据

        // 自动检测输入格式
        const decrypted = decrypt(key, iv, encrypted);