首页Home › 随机生成Random Generators
🎲 随机字节生成器Random Bytes Generator
用浏览器的加密级随机数生成任意数量的随机字节,输出为十六进制、Base64、二进制、十进制数组或 C/Python 字节数组,也可下载为 .bin 文件,用于密钥、盐值、测试数据。Generate any number of cryptographically secure random bytes as hex, Base64, binary, a decimal array or a C/Python byte array — or download a .bin file — for keys, salts and test data.
使用说明与常见问题How-to & FAQ
「随机字节生成器」是什么?What is the Random Bytes Generator tool?
用浏览器的加密级随机数生成任意数量的随机字节,输出为十六进制、Base64、二进制、十进制数组或 C/Python 字节数组,也可下载为 .bin 文件,用于密钥、盐值、测试数据。Generate any number of cryptographically secure random bytes as hex, Base64, binary, a decimal array or a C/Python byte array — or download a .bin file — for keys, salts and test data.
如何使用「随机字节生成器」?How do I use the Random Bytes Generator tool?
在「随机字节生成器」中,按需设置「字节数」、「格式」、「十六进制分隔」等选项,然后点击「生成」、「复制」、「下载 .bin」按钮即可。In the Random Bytes Generator: Set "Number of bytes", "Format", "Hex separator", then click "Generate", "Copy", "Download .bin".
这些随机字节安全吗?Are these bytes secure?
使用 Web Crypto 的 crypto.getRandomValues,由操作系统的加密安全随机源提供,适合生成密钥、盐值和令牌。数据只在你的浏览器里生成,不会发送到任何地方。They come from Web Crypto's crypto.getRandomValues, backed by the operating system's cryptographically secure source, so they are suitable for keys, salts and tokens. Everything is generated in your browser and sent nowhere.
32 字节有多少位?How many bits is 32 bytes?
1 字节 = 8 位,32 字节 = 256 位,相当于 AES-256 密钥或 SHA-256 摘要的长度;十六进制表示为 64 个字符,Base64 为 44 个字符。1 byte = 8 bits, so 32 bytes = 256 bits, the size of an AES-256 key or a SHA-256 digest. In hex that is 64 characters; in Base64, 44.
最多能生成多少?What is the maximum?
最多 10 MB。超过 256 KB 时文本框只显示前 262,144 字节(Base64 格式除外),结果下方会一直提示;C 数组和 Python 格式会在开头加注释说明只显示了一部分(声明的长度就是显示出的字节数),完整数据请用“下载 .bin”。“十六进制分隔”只对十六进制格式有效,选其他格式时会隐藏;二进制格式固定用空格分隔字节。Up to 10 MB. Above 256 KB the text box shows only the first 262,144 bytes (except Base64), and a note below says so. The C array and Python formats start with a comment saying only part is shown (the declared length is the number of bytes shown); use Download .bin for the full data. The hex separator only applies to the hex formats and is hidden for the others; binary always separates bytes with spaces.
随机结果真的随机吗?Is the randomness truly random?
「随机字节生成器」使用浏览器的 crypto.getRandomValues(密码学安全随机数)生成随机数据,不使用可预测的 Math.random。The Random Bytes Generator uses crypto.getRandomValues (cryptographically secure randomness), not the predictable Math.random.
「随机字节生成器」免费吗?需要注册吗?Is the Random Bytes Generator free? Do I need an account?
「随机字节生成器」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Random Bytes Generator is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.