Skip to content
Snippets Groups Projects
Commit 2e9b214a authored by Zandor Smith's avatar Zandor Smith :computer:
Browse files

Replace tabs with 4 spaces.

parent c8cd9201
Branches master
No related tags found
No related merge requests found
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
$methods = hash_algos(); $methods = hash_algos();
$hash = null; $hash = null;
if(isset($_POST['input']) && isset($_POST['type'])) { if(isset($_POST['input']) && isset($_POST['type'])) {
$input = $_POST['input']; $input = $_POST['input'];
$type = strtolower($_POST['type']); $type = strtolower($_POST['type']);
if(in_array($type, $methods)) { if(in_array($type, $methods)) {
$hash = hash($type, $input); $hash = hash($type, $input);
} else { } else {
$hash = "Not-supported hashing method selected"; $hash = "Not-supported hashing method selected";
} }
} }
?> ?>
...@@ -16,21 +16,21 @@ if(isset($_POST['input']) && isset($_POST['type'])) { ...@@ -16,21 +16,21 @@ if(isset($_POST['input']) && isset($_POST['type'])) {
<html lang="en"> <html lang="en">
<head> <head>
<title>Hash Online - SHA1, SHA256, MD5, etc.</title> <title>Hash Online - SHA1, SHA256, MD5, etc.</title>
<link rel="stylesheet" href="https://jksmithholding.ams3.cdn.digitaloceanspaces.com/css/v1/tuinbouw.min.css"> <link rel="stylesheet" href="https://jksmithholding.ams3.cdn.digitaloceanspaces.com/css/v1/tuinbouw.min.css">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script> <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
</head> </head>
<body> <body>
<div class="container"> <div class="container">
<div style="max-width: 600px; margin-left: auto; margin-right: auto; text-align: center;" class="mt-5"> <div style="max-width: 600px; margin-left: auto; margin-right: auto; text-align: center;" class="mt-5">
<h1>Hash Online</h1> <h1>Hash Online</h1>
<h5 class="text-muted">Hash SHA1, SHA256, MD5 and more online</h5> <h5 class="text-muted">Hash SHA1, SHA256, MD5 and more online</h5>
<br> <br>
...@@ -39,9 +39,9 @@ if(isset($_POST['input']) && isset($_POST['type'])) { ...@@ -39,9 +39,9 @@ if(isset($_POST['input']) && isset($_POST['type'])) {
using it because it is still using HTTP and create my own which is using HTTPS instead. You can check the using it because it is still using HTTP and create my own which is using HTTPS instead. You can check the
source out over at my GitLab server. <a href="https://git.zsinfo.nl/Zandor300/hash-online" target="_blank">Repository</a></p> source out over at my GitLab server. <a href="https://git.zsinfo.nl/Zandor300/hash-online" target="_blank">Repository</a></p>
<form method="post" action="/" class="mt-5"> <form method="post" action="/" class="mt-5">
<input type="text" class="form-control" name="input" id="input" placeholder="Your input"> <input type="text" class="form-control" name="input" id="input" placeholder="Your input">
<br> <br>
...@@ -49,9 +49,9 @@ if(isset($_POST['input']) && isset($_POST['type'])) { ...@@ -49,9 +49,9 @@ if(isset($_POST['input']) && isset($_POST['type'])) {
<?php <?php
foreach($methods as $method) { foreach($methods as $method) {
if((isset($_POST['type']) && $method == $_POST['type']) || (!isset($_POST['type']) && $method == "sha1")) { if((isset($_POST['type']) && $method == $_POST['type']) || (!isset($_POST['type']) && $method == "sha1")) {
echo "<option value='$method' selected>$method</option>"; echo "<option value='$method' selected>$method</option>";
} else { } else {
echo "<option value='$method'>$method</option>"; echo "<option value='$method'>$method</option>";
} }
} }
?> ?>
...@@ -61,17 +61,17 @@ if(isset($_POST['input']) && isset($_POST['type'])) { ...@@ -61,17 +61,17 @@ if(isset($_POST['input']) && isset($_POST['type'])) {
<input type="submit" class="btn btn-primary btn-lg" value="Hash"> <input type="submit" class="btn btn-primary btn-lg" value="Hash">
</form> </form>
</div> </div>
</div> </div>
<div style="margin-left: auto; margin-right: auto; text-align: center;" class="mt-5"> <div style="margin-left: auto; margin-right: auto; text-align: center;" class="mt-5">
<?php <?php
if(isset($hash) && $hash != null) { if(isset($hash) && $hash != null) {
echo "<br><br><h5>" . $_POST['type'] . " output</h5>"; echo "<br><br><h5>" . $_POST['type'] . " output</h5>";
echo $hash; echo $hash;
} }
?> ?>
</div> </div>
<div style="height: 120px;"></div> <div style="height: 120px;"></div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment