Code updated to use crypt
This commit is contained in:
47
templates/index.html
Normal file
47
templates/index.html
Normal file
@@ -0,0 +1,47 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>TNC's Hashing Tool</title>
|
||||
<link rel="stylesheet" href="/static/css/style.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<h2>TNC's Hashing Tool</h2>
|
||||
|
||||
<label for="algorithm">Algorithm</label>
|
||||
<select id="algorithm">
|
||||
<option value="sha512">sha512-crypt ($6$)</option>
|
||||
<option value="sha256">sha256-crypt ($5$)</option>
|
||||
</select>
|
||||
|
||||
|
||||
<label for="password">Password (minimum 16 characters)</label>
|
||||
<input id="password" type="password" placeholder="Enter password" minlength="16">
|
||||
|
||||
|
||||
<label for="salt">Salt (between 8 and 16 characters)</label>
|
||||
<div class="row">
|
||||
<input id="salt" type="text" placeholder="Enter salt or generate one">
|
||||
<button id="gensaltBtn" type="button" class="small">Generate salt</button>
|
||||
</div>
|
||||
<div class="note">Salt characters limited to <code>./0-9A-Za-z</code>.</div>
|
||||
|
||||
|
||||
<div class="controls">
|
||||
<button id="hashBtn">Compute hash</button>
|
||||
<button id="clearBtn" type="button">Clear</button>
|
||||
</div>
|
||||
|
||||
|
||||
<label for="result">Result</label>
|
||||
<textarea id="result" rows="4" readonly placeholder="Result will appear here"></textarea>
|
||||
</div>
|
||||
|
||||
<script src="/static/js/main.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user