BackBox Indonesia
Membuat password enc sendiri - Printable Version

+- BackBox Indonesia (https://www.backboxindonesia.or.id)
+-- Forum: Coding (https://www.backboxindonesia.or.id/forum-31.html)
+--- Forum: PHP Development (https://www.backboxindonesia.or.id/forum-34.html)
+--- Thread: Membuat password enc sendiri (/thread-56.html)



Membuat password enc sendiri - Logika Galau - 03-13-2016

PHP Code:
<?php
error_reporting
();
session_start();

$password "ec:550dfdef89bed03f550dfdef89bed03f"// 123

function login($key,$password){
$jum_key strlen($key);
$enc md5($key);
$jum_key substr(md5($jum_key),0,2);
$enc_1 substr($enc18);
$enc_2 substr($enc0,17);
$hasil "$jum_key:".substr(md5($enc_1),0,16).substr(md5($enc_1),0,16);
if(
$hasil==$password){
return 
true;
}else{
return 
false;
}
}

if(
$_POST['Passalt7']){
$cek login($_POST['password'],$password);
if(
$cek){
$_SESSION["login"]=$_POST['password'];
header('Location: ?');
}else{
echo 
"gagal";
}
}

if(!isset(
$_SESSION["login"])){
?>
<!DOCTYPE html>
<html>
<head>
<title>Login Page</title>
</head>
<body>
<form action="" method="post">
<input type="text" name="password">
<input type="submit" name="Passalt7">
</form>
</body>
</html>
<?php
}else{
echo 
"HALOOO";
}
?>
di atas adalah salah satu password enc modifan yang di ambil dari enc md5 dan biasa di kreasikan lagi sesuai dengan suasana hati.