+ 2
please please help me in this project JavaScript I want to create strong password generator java script is not working plz help
3 odpowiedzi
+ 3
Line 69:
onclick is right. You put here is one click. So change it.
Line 80:
password += is right. You put here is password =+. Also change this.
+ 7
Just want to drop some quote here:
"""
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.
"""
from
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random
If the password has to be 'strong', as you said, dont use Math.random().
+ 3
* HTML section
- Line 69:
Event handler name should be 'onclick', instead of 'oneclick'
- Remove <script> block containing 'getPassword' function duplicate in HTML section.
* JS section
Line 9:
password += chars.substring(randomNumber,randomNumber+1);