Skip to content

Commit

Permalink
Improved example and added more information to the library
Browse files Browse the repository at this point in the history
  • Loading branch information
zigazajc007 committed Oct 5, 2022
1 parent 7fabbb7 commit 8063f38
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
6 changes: 6 additions & 0 deletions PasswordEntropy.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/*
PasswordEntropy-JS v1.0.2
https://github.com/Rabbit-Company/PasswordEntropy-JS
License: GPL-3.0
*/

class PasswordEntropy{

static lcase = "abcdefghijklmnopqrstuvwxyz";
Expand Down
5 changes: 5 additions & 0 deletions PasswordEntropy.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
<html>
<head>
<title>PasswordEntropy-JS</title>
<!-- First we import PasswordEntropy library -->
<script src="PasswordEntropy.js"></script>
</head>
<body>
<h1><a href="https://github.com/Rabbit-Company/PasswordEntropy-JS" target="_blank">PasswordEntropy-JS</a></h1>

<input id="password" type="password" placeholder="Password" />
<button id="btn-calculate">Calculate Entropy</button>
<p>Your password entropy is <b id="result">0</b>.</p>

<h1>Performance Test</h1>
Expand All @@ -20,7 +18,6 @@ <h1>Performance Test</h1>
</div>
<p id="perf"></p>

<!-- Then we can work with it -->
<script src="index.js"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
document.getElementById("btn-calculate").addEventListener('click', () => {
document.getElementById("password").addEventListener('input', () => {
let password = document.getElementById("password").value;

document.getElementById("result").innerText = PasswordEntropy.calculate(password);
Expand Down

0 comments on commit 8063f38

Please sign in to comment.