4 ms·
Show HN: Cryptographically random strings with zero clicks
- connorlanigan 7y agoWhenever I need random data for something (as a password, a token, a seed, a server-side secret...) and google for a generator, I always end up on random.org, entering the same configuration, clicking the same checkboxes and clicking the same button. This takes an unnecessary amount of time. I built this website that uses secure defaults and immediately presents you with a string of random data generated locally in your browser. It uses the Web Crypto API [1] for obtaining strong randomness. It's running on Cloudflare to be as fast as possible. [1] https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_...
- bloak 7y agoYou'd use a website and a web browser for generating random data for a password or a server-side secret? What's wrong with "head -c 16 /dev/urandom | base64"? (Except that it assumes Linux.)
- susam 7y agoWhat I usually do for this is run the following command on shell: LC_CTYPE=C tr -dc [:alnum:] < /dev/urandom | head -c 20; echo Works on both macOS and Linux. See https://twitter.com/susam/status/1160420869862117377 https://twitter.com/susam/status/1160420869862117377 for a screenshot.