/
encrypt.php
37 lines (31 loc) · 1.05 KB
/
encrypt.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
<?php
if(isset($_POST['password'])) $password = $_POST['password'];
if(isset($password)) $md5password = md5($password);
if(isset($password)) $sha1password = sha1($password);
if(isset($password)) $bcryptpass = password_hash($password, PASSWORD_DEFAULT);
//if(isset($password)) $cryptpassword = crypt($password);
?>
<!DOCTYPE>
<html>
<head>
<title>Password Encryption</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<link href="custom-style.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="content">
<p><strong>MD5:</strong>
<?php echo isset($password) ? $md5password : 'nothing to do'; ?>
</p>
<p><strong>Sha1:</strong>
<?php echo isset($password) ? $sha1password : 'nothing to do'; ?>
</p>
<p><strong>BCrypt:</strong>
<?php echo isset($password) ? $bcryptpass : 'nothing to do'; ?>
</p>
</div>
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
</body>
</html>