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

Use hash_algos() function in PHP.

parent 46e88487
No related branches found
No related tags found
No related merge requests found
......@@ -4,19 +4,15 @@ if(isset($_POST['input']) && isset($_POST['type'])) {
$input = $_POST['input'];
$type = strtolower($_POST['type']);
if($type == "sha1") {
$hash = sha1($input);
} else if($type == "sha256") {
$hash = hash('sha256', $input);
} else if($type == "md5") {
$hash = md5($input);
if(in_array($type, hash_algos())) {
$hash = hash($type, $input);
} else {
$hash = "Not-supported hashing method selected";
}
}
?>
<html>
<html lang="en">
<head>
<title>Hash Online - SHA1, SHA256, MD5, etc.</title>
......
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