Skip to content

Instantly share code, notes, and snippets.

View AES CHIPER
class PHP_AES_Cipher {
private static $OPENSSL_CIPHER_NAME = "aes-128-cbc"; //Name of OpenSSL Cipher
private static $CIPHER_KEY_LEN = 16; //128 bits
/**
* Encrypt data using AES Cipher (CBC) with 128 bit key
*
* @param type $key - key to use should be 16 bytes long (128 bits)
* @param type $iv - initialization vector
@aditagusta
aditagusta / .htaccess
Created Jul 22, 2021
.htaccess didalam public laravel
View .htaccess
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
@aditagusta
aditagusta / callback
Last active Jul 22, 2021
Callback Mutasibank
View callback
public function callBack(Request $request)
{
$data = $request->all();
if($data['api_key'] === env('API_MUTASI_KEY'))
{
$toStorage = [
'hostname' => $_SERVER,
'header' => getallheaders(),
'body' => $request->all()
];
@aditagusta
aditagusta / .htaccess
Created Apr 29, 2021
.htaccess Laravel
View .htaccess
RewriteEngine on
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(.*)$ public/$1 [L]
@aditagusta
aditagusta / FungsiAkses
Created Feb 3, 2021
Hak Akses Web dibatasi Oleh Waktu
View FungsiAkses
function my_Clock() {
this.cur_date = new Date();
this.hours = this.cur_date.getHours();
this.minutes = this.cur_date.getMinutes();
this.seconds = this.cur_date.getSeconds();
}
my_Clock.prototype.run = function () {
setInterval(this.update.bind(this), 1000);
};
@aditagusta
aditagusta / Fungsi Terbilang Rupiah
Created Nov 20, 2020
Mengubah dari nilai angka ke kalimat
View Fungsi Terbilang Rupiah
<b>Masukkan Nilai</b>
<br />
Rp. <input id="nominall" onkeyup="terbilang();" type="text" value="1945" />
<br />
<div id="terbilang">
</div>
<script>
function terbilang(){
var bilangan=document.getElementById("nominal").value;