Skip to main content

Encrypt Plaintext Script

  • Description

    POST /encript HTTP/1.1
    args: {"no_strip":true|false, "info":{}, "entitlements":{}, "xuic":true|false}

    [script content]
  • Parameters

    • no_strip: boolean
      When true, keep debug info so stack traces retain line numbers. Default false
    • info: table
      Metadata bundled with the script, such as Name, Version, Description, etc.
    • entitlements: table
      Script permission configuration
      • allow-external-require
        If missing or false, only scripts encrypted with the same author certificate may require this script; if a list, allow scripts signed by the listed authors; if true, allow any script to require
    • xuic: boolean
      When true, encrypt an XUI file into XUIC format and ignore other parameters. Default false
    • script content: string
      The plaintext script body to encrypt, sent as the request payload
  • Possible Responses

    • Success: status code 200 with body
      [encrypted script content]
    • Failure: status code 400 with body
      {"code":2,"message":"Syntax error in script","detail":"specific error details"}
      {"code":13,"message":"Another encryption is in progress..."}