function paramEncrypt($x) { $Cipher = new AES(); // kunci enkripsi (Anda bisa memodifikasi kuncinya) $key_128bit = '2b7e151628aed2a6abf7158809cf4f3c'; // membagi panjang string yang akan dienkripsi dengan panjang 16 karakter $n = ceil(strlen($x) / 16); $encrypt = ""; for ($i = 0; $i <= $n - 1; $i++) { // mengenkripsi setiap 16 karakter $cryptext = $Cipher->encrypt($Cipher->stringToHex(substr($x, $i * 16, 16)), $key_128bit); // menggabung hasil enkripsi setiap 16 karakter menjadi satu string enkripsi utuh $encrypt .= $cryptext; } return $encrypt; }
function encoder($x) { $value = new hash_encryption($keypass1); $first = $value->encrypt($x); $first_output = ''; $count = 0; while ($count < strlen($encrypted)) { $enc_output .= substr($first, $count, 80) . "<br>"; $count += 80; } $Cipher = new AES(); $key_256bit = $keypass; $n = ceil(strlen($first) / 16); $encrypt = ""; for ($i = 0; $i <= $n - 1; $i++) { $cryptext = $Cipher->encrypt($Cipher->stringToHex(substr($first, $i * 16, 16)), $key_256bit); $encrypt .= $cryptext; } return $encrypt; }
function paramEncrypt($x) { $first_output = ''; $count = 0; $Cipher = new AES(); $key_256bit = keypass(); $n = ceil(strlen($x) / 16); $encrypt = ""; for ($i = 0; $i <= $n - 1; $i++) { $cryptext = $Cipher->encrypt($Cipher->stringToHex(substr($x, $i * 16, 16)), $key_256bit); $encrypt .= $cryptext; } return $encrypt; }