🎲 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 位隨機