Secret Key Generator
Generate strong secret keys for JWT signing, symmetric encryption, HMAC signing and other cryptographic operations. Everything is generated in your browser using the Web Crypto API (crypto.getRandomValues), so no secret ever leaves your device.
常见问题
JWT密钥应该有多长?
对于HS256,至少需要32字节(256位)。使用44个字母数字字符的密钥可以留有安全余量。
我可以用这个生成AES加密密钥吗?
AES-256需要精确的32字节。生成一个32个字符的密钥,然后将其编码为Base64或十六进制格式,以便在大多数库中使用。