f054bbd2f5ebab9cb5571000b2c50c02
Creating strong passwords is essential for your online security. Follow these guidelines to help protect your accounts:
const bucketSize = maxMultiple / range;
return min + Math.floor(randomValue / bucketSize);
to
return min + (randomValue % range);
Permalink: https://pastebin.com/uPjJGyFD
Permalink: https://pastebin.com/e3Bih0J5
- Added a password list that you can download and copy by clicking it.
- Added favicon.
- Corrected the news board and uppercased it on accident.
- Added some more stuff.
function copyAndDownload() {
const passwordListTextarea = document.getElementById("passwordlist");
const textContent = passwordListTextarea.value;
const blob = new Blob([textContent], { type: "text/plain" });
const url = URL.createObjectURL(blob);
const downloadLink = document.createElement("a");
downloadLink.href = url;
downloadLink.download = "password_list.txt";
downloadLink.click();
URL.revokeObjectURL(url);
}
Permalink: https://pastebin.com/4Wiq8CRS
Fixed a bug in generatePassword() that made the password sometimes shorter than the user's input. Also changed getRandomInt() to:
function getRandomInt(min, max) {
const cryptoObj = window.crypto || window.msCrypto;
const range = max - min + 1;
if (range <= 0) {
throw new Error('Invalid range');
}
const maxMultiple = Math.floor(0xFFFFFFFF / range) * range;
let randomValue;
do {
const array = new Uint32Array(1);
cryptoObj.getRandomValues(array);
randomValue = array[0];
} while (randomValue >= maxMultiple);
const bucketSize = maxMultiple / range;
return min + Math.floor(randomValue / bucketSize);
}
Added crypto randomness:
let password = "";
for (let i = 0; i < length; i++) {
const randomIndex = getRandomInt(0, allChars.length);
password += allChars.charAt(randomIndex);
}
function getRandomInt(min, max) {
const cryptoObj = window.crypto || window.msCrypto;
const array = new Uint32Array(1);
cryptoObj.getRandomValues(array);
return min + (array[0] / 0xFFFFFFFF) * (max - min + 1);
}
Old version: https://pastebin.com/um2W0W8q
Made under 10 minutes! (Using ChatGPT 3.5) Still adding stuff.
Second ChatGPT-3.5 conversation: https://chat.openai.com/share/44f5d06b-f855-40bb-85fb-2ae02d1aa41b
Original ChatGPT-3.5 conversation: https://chat.openai.com/share/bf48570d-0cbd-4d54-a763-0ade7e0c574d