Adding Generate Password Operation#1879
Conversation
… inputs for the inclusion of symbols and numbers.
> Strings must use doublequote quotes
> Newline required at end of file but not found eol-last
|
The check seems to be failing on a different test, not sure why that's happening! |
|
Hey 0xff1ce, really great feature idea. I want this so badly in Cyberchef. |
That's fine with me, thanks! |
| alphabet += numbers ? numberSet : ""; | ||
| const resultArray = new Array(len); | ||
| for (let i = 0; i < len; i++) { | ||
| resultArray[i] = alphabet.charAt(Math.floor(Math.random() * alphabet.length)); |
There was a problem hiding this comment.
Use Crypto.getRandomValues() rather than Math.Random() as the latter is not suitable for security purposes.
| * @param {Object[]} args | ||
| * @returns {string} | ||
| */ | ||
| async run(input, args) { |
There was a problem hiding this comment.
Does this need to be async?
Generates a password of given length and complexity based on optional inputs for the inclusion of symbols and numbers.