-
Notifications
You must be signed in to change notification settings - Fork 4
/
caesarcipher.php
executable file
·67 lines (61 loc) · 3.05 KB
/
caesarcipher.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php include'header.php'; ?>
<!-- Main -->
<header class="major">
<h2>Ciphers & Algorithms</h2>
<p>CAESAR CIPHER</p>
</header>
<div class="container">
<div class="row">
<div class="4u">
<section>
<h3>Ciphers</h3>
<ul class="alt">
<?php echo getCipherList(); ?>
</ul>
</section>
</div>
<div class="8u skel-cell-important">
<h2>Encryption</h2>
<section>
<form action="results.php" method="post" enctype="multipart/form-data">
<textarea name="caesarPlaintext" placeholder="Enter the plaintext here to encrypt it" value=""></textarea>
<?php
if(isset($_SESSION['userEmail'])){
echo "<b>OR  </b><input type=\"file\" name=\"CipherFile\" value=\"Upload File\"
data-validation=\"mime size\" data-validation-allowing=\"txt\" data-validation-max-size=\"1024kb\"><b>(Supports only 'txt' File!)";
}
else
echo "<b> Sign in <a href =\"dashboard.php\">here</a> to encrypt File-content</b>"
?>
<br><br>
<input type="text" name="caesarKey" placeholder="Enter key in number (0-25)" >
<br>
<input type="hidden" name="cipherName" value="CAESAR CIPHER">
<input type=submit>
<input type=reset>
</form>
</section>
<h2>Decryption</h2>
<section>
<form action="decryptresults.php" method="post" enctype="multipart/form-data">
<textarea name="caesarEncryptedtext" placeholder="Enter the encrypted text here to decrypt it" value=""></textarea>
<?php
if(isset($_SESSION['userEmail'])){
echo "<b>OR  </b><input type=\"file\" name=\"CipherFile\" value=\"Upload File\"
data-validation=\"mime size\" data-validation-allowing=\"txt\" data-validation-max-size=\"1024kb\"><b>(Supports only 'txt' File!)";
}
else
echo "<b> Sign in <a href =\"dashboard.php\">here</a> to encrypt File-content</b>"
?>
<br><br>
<input type="text" name="caesarKey" placeholder="Enter key in number (0-25)" >
<br>
<input type="hidden" name="cipherName" value="CAESAR CIPHER">
<input type=submit>
<input type=reset>
</form>
</section>
</div>
</div>
</div>
<?php include'footer.php'; ?>