← 返回列表
D

dsh-password

v0.1.0 · 2 天前发布

DSH plugin: strong password / diceware passphrase generator (password_generate).

dsh-pluginpasswordsecurity

README

dsh-password

DSH 插件:强密码 / Diceware 口令生成工具,注册一个 password_generate 工具。

纯 ESM、零依赖、无构建步骤。所有随机性来自 node:crypto.randomInt(均匀采样,加密安全)。

安装

sh
dsh plugin --profile <name> add file:./plugins/dsh-password

或发布后


dsh plugin --profile <name> add dsh-password

工具 password_generate

参数:

| 参数 | 类型 | 默认 | 说明 |
|---|---|---|---|
| type | string(enum random/diceware) | random | 生成类型 |
| length | number | 20 | 密码长度(8–128,仅 random) |
| count | number | 1 | 生成数量(1–10) |
| words | number | 5 | Diceware 单词数(4–8,仅 diceware) |
| separator | string | - | Diceware 单词连接符 |
| includeSymbols | boolean | true | 是否包含符号(仅 random) |
| avoidAmbiguous | boolean | true | 排除易混淆字符 Il1O0(仅 random) |

返回值(规范 JSON 对象):

```json
{
"ok": true,
"passwords": ["...",

版本兼容矩阵

DSH 版本状态说明
dsh@0.1.0-rc.6 ✅ 兼容 cordis patch ✅
dsh@0.1.0 ✅ 兼容 标准 patch ✅
dsh@0.2.0 ⚠️ 待验证 待实测(API 可能在变)
dsh@0.3.0+ ❓ 未知 尚未发布

💡 兼容矩阵每周末自动跑实测,欢迎 PR 修正

元数据

License
MIT
npm
dsh-password
Repo
Engines
{}
Weekly DL
0
Monthly DL
0
dsh.bundle
{"bundle":{"patch":"./cordis.patch.yml"}}