{
  "name": "encrypt",
  "title": "加密工具",
  "description": "数据加解密：Base64 编解码、SHA/MD5 哈希、AES 加解密、随机字节。适用场景：哈希或加密时。工作流提示：action 选 hash/base64_encode，data 填数据，algorithm 选 sha256/md5/aes，AES 填 key，random 用 length；结果在 output。",
  "type": "data",
  "params": {
    "type": "object",
    "properties": {
      "action": {
        "type": "string",
        "description": "操作类型: hash/base64_encode/base64_decode/aes_encrypt/aes_decrypt/random",
        "default": "hash",
        "enum": [
          "hash",
          "base64_encode",
          "base64_decode",
          "aes_encrypt",
          "aes_decrypt",
          "random"
        ]
      },
      "data": {
        "type": "string",
        "description": "待处理的数据"
      },
      "algorithm": {
        "type": "string",
        "description": "算法: sha256/md5/sha1/sha512/aes-256-cbc/aes-128-cbc",
        "default": "sha256",
        "enum": [
          "sha256",
          "md5",
          "sha1",
          "sha512",
          "aes"
        ]
      },
      "key": {
        "type": "string",
        "description": "加密密钥（AES模式）"
      },
      "encoding": {
        "type": "string",
        "description": "编码格式: hex/base64/latin1",
        "default": "base64",
        "enum": [
          "hex",
          "base64",
          "latin1"
        ]
      },
      "length": {
        "type": "number",
        "description": "随机字节长度（random模式）",
        "default": 16,
        "min": 1,
        "max": 100000
      }
    }
  },
  "returns": {
    "type": "object",
    "properties": {
      "result": {
        "type": "object",
        "description": "加密结果对象（含 hash/encoded/decrypted/encrypted 等）"
      }
    }
  },
  "options": {},
  "group": "crypto"
}
