4 ms·
Is this password-generator sufficient?
- aneelkkhatri 3y agoWanted to create a very simple password generator. Is it sufficient, or there're some indispensable features missing?
- deleted 3y ago[deleted]
- aneelkkhatri 3y agoAlso, need feedback around the UI. Is it too simple?
- cratermoon 3y agoFrom https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... Math.random() does not provide cryptographically secure random numbers. Do not use them for anything related to security. Use the Web Crypto API instead, and more precisely the window.crypto.getRandomValues() method
- aneelkkhatri 3y agoInteresting!
- cratermoon 3y agoPlease, please, if you're going to go into anything related to security, read up on the subject. It's ok to do things like to learn, but putting them into production is unwise. See, for example, https://www.schneier.com/crypto-gram/archives/1998/1015.html#cipherdesign https://www.schneier.com/crypto-gram/archives/1998/1015.html... and read up, with books like Applied Cryptography. Read a few DefCon papers or videos.
- aneelkkhatri 3y agoWow! Thanks for the feedback.
- aneelkkhatri 3y agoI have updated the logic to use window.crypto.getRandomValues(); also made some UI adjustments.