mirror of
https://github.com/S2-/pwgen.git
synced 2025-08-03 09:10:04 +02:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
c26eba33c0 | |||
42838040d2 | |||
8ab06aa554 |
@@ -2,7 +2,7 @@
|
|||||||
"description": "Just a toolbar button that generates a password and copies it to your clipboard.",
|
"description": "Just a toolbar button that generates a password and copies it to your clipboard.",
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"name": "pwgen reloaded",
|
"name": "pwgen reloaded",
|
||||||
"version": "1.1.5",
|
"version": "1.1.6",
|
||||||
"homepage_url": "https://github.com/S2-/pwgen",
|
"homepage_url": "https://github.com/S2-/pwgen",
|
||||||
"icons": {
|
"icons": {
|
||||||
"48": "icons/lock-48.png"
|
"48": "icons/lock-48.png"
|
||||||
|
@@ -4,8 +4,6 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<link rel="stylesheet" href="chrome://global/skin/global.css" type="text/css" />
|
<link rel="stylesheet" href="chrome://global/skin/global.css" type="text/css" />
|
||||||
<link rel="stylesheet" href="chrome://global/skin/in-content/common.css" type="text/css" />
|
<link rel="stylesheet" href="chrome://global/skin/in-content/common.css" type="text/css" />
|
||||||
<link rel="stylesheet" href="chrome://mozapps/content/extensions/extensions.css" type="text/css" />
|
|
||||||
<link rel="stylesheet" href="resource://gre-resources/forms.css" type="text/css" />
|
|
||||||
|
|
||||||
<link rel="stylesheet" href="pwgen.css"/>
|
<link rel="stylesheet" href="pwgen.css"/>
|
||||||
</head>
|
</head>
|
||||||
|
@@ -3,10 +3,15 @@ function randPassword(length, includeSpecial) {
|
|||||||
if (includeSpecial) {
|
if (includeSpecial) {
|
||||||
pwdChars += '°^!"§$%&/()=?`´\\}][{²³€|<>-.,;:*+_µ@~';
|
pwdChars += '°^!"§$%&/()=?`´\\}][{²³€|<>-.,;:*+_µ@~';
|
||||||
}
|
}
|
||||||
let randPassword = Array(length).fill(pwdChars).map(function(x) {
|
|
||||||
return x[Math.floor(Math.random() * x.length)]
|
let randValues = new Uint32Array(length);
|
||||||
}).join('');
|
let randPwd = '';
|
||||||
return randPassword;
|
window.crypto.getRandomValues(randValues);
|
||||||
|
for(i=0; i<length; i++)
|
||||||
|
{
|
||||||
|
randPwd += pwdChars[randValues[i] % pwdChars.length];
|
||||||
|
}
|
||||||
|
return randPwd;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getParams() {
|
function getParams() {
|
||||||
|
Reference in New Issue
Block a user