首页Home › 编码与加密Encoding & Crypto
🧂 Scrypt 哈希生成与验证Scrypt Hash Generator & Verifier
按 RFC 7914 计算 scrypt 密钥派生结果,可设置 N、r、p、输出长度和盐(UTF-8、Hex 或 Base64),并能把结果与已有哈希比对验证。Derive scrypt keys per RFC 7914 with configurable N, r, p, output length and salt (UTF-8, hex or Base64), and verify the result against an existing hash.
使用说明与常见问题How-to & FAQ
「Scrypt 哈希生成与验证」是什么?What is the Scrypt Hash Generator & Verifier tool?
按 RFC 7914 计算 scrypt 密钥派生结果,可设置 N、r、p、输出长度和盐(UTF-8、Hex 或 Base64),并能把结果与已有哈希比对验证。Derive scrypt keys per RFC 7914 with configurable N, r, p, output length and salt (UTF-8, hex or Base64), and verify the result against an existing hash.
如何使用「Scrypt 哈希生成与验证」?How do I use the Scrypt Hash Generator & Verifier?
输入密码和盐,设置成本参数 N(2 的幂)、块大小 r 和并行度 p,点「计算」得到十六进制和 Base64 结果;在「比对」中粘贴已有哈希即可验证。用 RFC 7914 的测试向量 password / NaCl / N=1024 / r=8 / p=16 可得到 fdbabe1c…Enter the password and salt, set the cost N (a power of 2), block size r and parallelism p, then press Compute to get hex and Base64 output; paste an existing hash into Compare to verify. The RFC 7914 vector password / NaCl / N=1024 / r=8 / p=16 gives fdbabe1c…
N、r、p 应该怎么设置?How should I choose N, r and p?
N 是 CPU/内存成本(必须是 2 的幂),r 是块大小,p 是并行度,所需内存约为 128 × N × r 字节。交互式登录常用 N=16384(2¹⁴)、r=8、p=1,约占 16 MB 内存。N is the CPU/memory cost (a power of 2), r the block size and p the parallelism; memory is about 128 × N × r bytes. N=16384 (2¹⁴), r=8, p=1 — about 16 MB — is a common choice for interactive logins.
能验证其他程序生成的 scrypt 哈希吗?Can I verify hashes from other programs?
可以,只要知道当时用的盐、N、r、p 和输出长度。把这些参数填进来计算后,在「比对」中粘贴原哈希(十六进制或 Base64)即可。注意有些库会把参数和盐打包成自己的格式,需要先拆开。Yes, if you know the salt, N, r, p and output length used. Enter them, compute, and paste the original hash (hex or Base64) into Compare. Some libraries wrap parameters and salt in their own format, which you need to unpack first.
「Scrypt 哈希生成与验证」免费吗?数据会上传吗?Is the Scrypt Hash Generator & Verifier free? Is my data uploaded?
「Scrypt 哈希生成与验证」完全免费,无需注册或安装,手机和电脑都能用;所有处理都在你的浏览器本地完成,输入的内容和文件不会上传到服务器。The Scrypt Hash Generator & Verifier is completely free with no sign-up or install and works on phones and desktops; everything runs locally in your browser and nothing you enter is uploaded.