(required: bool = False)
| 259 | return path.strip() or "." |
| 260 | |
| 261 | def _ask_password(required: bool = False) -> str: |
| 262 | hint = "密码(必填)" if required else "密码(留空则不加密)" |
| 263 | pwd = questionary.password(hint).ask() |
| 264 | if pwd is None: |
| 265 | raise KeyboardInterrupt |
| 266 | return pwd or None |
| 267 | |
| 268 | MENU = { |
| 269 | "📥 数据隐写 — 嵌入": "embed", |