otp-generator/index.html

147 lines
4.1 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>One-Time Pad Generator</title>
<meta name="description" content="One-Time Pad Generator">
<link rel="stylesheet" href="./node_modules/font-awesome/css/font-awesome.css">
<link rel="stylesheet" href="./node_modules/bulma/css/bulma.css">
<!--[if lt IE 9]>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="section">
<div class="container">
<div class="columns">
<div class="column is-one-third">
<h2 class="title">
Generate a One-Time Pad
</h2>
<div class="field has-addons">
<div class="control">
<input class="input" type="number" id="padLength" placeholder="Length">
</div>
<div class="control">
<a class="button" id="generatePad">
<span>
Generate Pad
</span>
<span class="icon">
<i class="fa fa-lock"></i>
</span>
</a>
</div>
</div>
<div class="columns">
<div class="column">
<label class="label">One-Time Pad</label>
<div class="box">
<pre id="generatedPad"></pre>
</div>
</div>
</div>
</div>
<div class="column is-one-third">
<h2 class="title">
Encrypt a Message
</h2>
<div class="field">
<label class="label">
Your Message
<div class="control">
<textarea id="input" class="textarea"></textarea>
</div>
</label>
</div>
<div class="field">
<label class="label">
One-Time Pad
<div class="control">
<textarea id="inputPad" class="textarea"></textarea>
</div>
<div class="help is-error" id="inputError"></div>
</label>
</div>
<div class="field">
<div class="control">
<a class="button" id="encryptInput">
<span>
Encrypt
</span>
<span class="icon">
<i class="fa fa-lock"></i>
</span>
</a>
</div>
</div>
<div class="columns">
<div class="column">
<label class="label">Encrypted Message</label>
<div class="box">
<pre id="encrypted" style="width:100%;line-break"></pre>
</div>
</div>
</div>
</div>
<div class="column is-one-third">
<h2 class="title">
Encrypt a Message
</h2>
<div class="field">
<label class="label">
Their Message
<div class="control">
<textarea id="encryptedInput" class="textarea"></textarea>
</div>
</label>
</div>
<div class="field">
<label class="label">
One-Time Pad
<div class="control">
<textarea id="encryptedInputPad" class="textarea"></textarea>
</div>
<div class="help is-error" id="inputError"></div>
</label>
</div>
<div class="field">
<div class="control">
<a class="button" id="decryptInput">
<span>
Decrypt
</span>
<span class="icon">
<i class="fa fa-unlock"></i>
</span>
</a>
</div>
</div>
<div class="columns">
<div class="column">
<label class="label">Decrypted Message</label>
<div class="box">
<pre id="decrypted" style="width:100%;line-break"></pre>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="./index.js"></script>
</body>
</html>