Skip to content

Instantly share code, notes, and snippets.

View Jabriko's full-sized avatar

Jabriko Banjarnegara Jabriko

  • Banjarnegara
View GitHub Profile
<?php
//Initialize the session
session_start();
//Check if the user is logged in, if not then redirect him to login page
if(!isset($_SESSION["loggedin"]) || $_SESSION["loggedin"] !== true) {
header("location: ../index.php");
exit();
}
@Jabriko
Jabriko / JPasswordMD5Example2.java
Created January 16, 2020 08:34
Hasil modifikasi JPasswordField ke MD5.. Menjadi JPasswordField ke MD5 + Salt.
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package passwordmd5withsalt;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package passwordfieldtomd5;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;