🎲 Random String Generator

📐 工作原理与说明
安全随机字符串生成
随机源:crypto.getRandomValues(密码学安全),拒绝采样消除取模偏差;不支持 Web Crypto 时显式提示,绝不回落 Math.random
生成方式:每个字符从字符集等概率抽取
字符集可选:大写 26|小写 26|数字 10|符号 25 类
理论熵(bits) = 长度 × log₂(字符集大小)
强度评级:<40 弱|<60 中|<120 强|≥120 极强
约束:长度 1~128,条数 1~50
生成指定字符集的随机字符串。
  • 字符集:大小写字母、数字、符号可自由组合,并支持排除易混字符(如 0/O、l/1)。
  • 安全:用于口令或令牌时必须用 crypto.getRandomValues,而非 Math.random。
  • 强度:熵 ≈ 长度 × log₂(字符集大小),熵越高越难被猜到。
  • 用途:临时口令、API 令牌、验证码与前端临时标识。

Random String Generator - Generate secure random strings with custom length and character sets (upper/lower/digit/symbol), batch output and one-click copy. U...

Formula & Standard References

Item Formula / Note Source / Standard
Entropy H = L * log2(N) for length L and alphabet size N NIST SP 800-63B
Alphabet removing confusables lowers entropy; lengthen instead NIST SP 800-63B
Random source use a CSPRNG, never timestamps or counters NIST SP 800-90A
⚠️ 使用说明与注意事项

📋 用法建议

用途建议
临时令牌16–32 位,含大小写+数字+符号
测试数据8–16 位即可
盐值(salt)≥16 位随机