当前位置: 首页>>代码示例>>PHP>>正文


PHP enkripsi函数代码示例

本文整理汇总了PHP中enkripsi函数的典型用法代码示例。如果您正苦于以下问题:PHP enkripsi函数的具体用法?PHP enkripsi怎么用?PHP enkripsi使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了enkripsi函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: formatting

function formatting($row)
{
    $suratmasukviewlink = 106;
    //render field as details link
    $data = $row->get_value("NoSurat");
    // $row->set_value("TujuanSurat","<a href='details.php?id={$data}'><img src='image/ico_view.gif' alt='Lihat'> </a>");
    $alamat = "index.php?p=" . enkripsi($suratmasukviewlink . "&q=" . $data);
    $row->set_value("IdPenerima", "<a href='{$alamat}'><img src='images/ico_view.gif' > </a>");
    $data = $row->get_value("TglTerima");
    $row->set_value("TglTerima", date("d-m-Y", strtotime($data)));
}
开发者ID:abbeet,项目名称:server39,代码行数:11,代码来源:02_basic_connector.php

示例2: kirim_chat

 public function kirim_chat()
 {
     $this->load->view("fungsiRSA");
     /* 
     		-- keterangan Masing Masing Fungsi yang dipake dari Library gmp --
     gmp_div_qr = Bagi;
     		gmp_add    = Tambah;
     		gmp_mul    = Kali;
     		gmp_sub    = Kurang;
     		gmp_gcd    = Menghitung Nilai phi;
     		gmp_strval = Convert Nomer ke String;
     */
     // Inisialisasi P = 113 & Q = 157 (Masing Masing adalah Bilangan Prima) <--- Lebih Besar Lebih Bagus
     // Menghitung N = P*Q
     $n = gmp_mul(113, 157);
     $valn = gmp_strval($n);
     // Menghitung Nilai M =(p-1)*(q-1)
     $m = gmp_mul(gmp_sub(113, 1), gmp_sub(157, 1));
     // Mencari E (Kunci Public --> (e,n))
     // Inisialisasi E = 5
     // Membuktikan E = FPB (Faktor Persekutuan Terbesar) dari E dan M = 1
     for ($e = 5; $e < 1000; $e++) {
         // Mencoba dengan Perulangan 1000 Kali
         $fpb = gmp_gcd($e, $m);
         if (gmp_strval($fpb) == '1') {
             // Jika Benar E adalah FPB dari E dan M = 1 <-- Hentikan Proses
             break;
         }
     }
     // Menghitung D (Kunci Private --> (d,n))
     // D = (($m * $i) + 1) / e = $key[1] <-- Perulangan Do While
     $i = 1;
     do {
         $key = gmp_div_qr(gmp_add(gmp_mul($m, $i), 1), $e);
         $i++;
         if ($i == 1000) {
             // Dengan Perulangan 1000 Kali
             break;
         }
     } while (gmp_strval($key[1]) != '0');
     // Hasil D = $key[0]
     $d = $key[0];
     $vald = gmp_strval($d);
     $user = $this->input->post("user");
     $pesan = $this->input->post("pesan");
     $userid = $this->input->post("iduser");
     $hasilenkripsi = enkripsi($pesan, $n, $e);
     $insert = "insert into chat (user,pesan,id_user) VALUES ('{$user}','{$hasilenkripsi}','{$userid}')";
     $this->db->query($insert);
     redirect("home/ambil_pesan");
 }
开发者ID:senusop,项目名称:myRepo,代码行数:51,代码来源:home.php

示例3: formatting

function formatting($row)
{
    $suratkeluarviewlink = 78;
    //render field as details link
    $data = $row->get_value("IdSuratKeluar");
    // $row->set_value("TujuanSurat","<a href='details.php?id={$data}'><img src='image/ico_view.gif' alt='Lihat'> </a>");
    //  $row->set_value("DicatatOleh","<a href='surat_masuk_cari_view.php?id={$data}'><img src='images/ico_view.gif' > </a>");
    $alamat = "index.php?p=" . enkripsi($suratkeluarviewlink . "&q=" . $data);
    //$alamat = "<a href='index.php?p=".enkripsi($suratmasukviewlink ."&q=".$data)."><img src='images/ico_view.gif'></a>";
    // $row->set_value("DicatatOleh","<a href='index.php?p=\".enkripsi($suratmasukviewlink &q=\{$data})\"><img src=\"images/ico_view.gif\" ></a>");
    $row->set_value("DicatatOleh", "<a href='{$alamat}'><img src='images/ico_view.gif'></a>");
    $data = $row->get_value("WaktuBuat");
    $row->set_value("WaktuBuat", date("d-m-Y", strtotime($data)));
}
开发者ID:abbeet,项目名称:server39,代码行数:14,代码来源:01x_basic_connector.php

示例4: register

 public function register()
 {
     $this->form_validation->set_rules('name', 'Name', 'trim|required|xss_clean|is_unique[user.user_name]');
     $this->form_validation->set_rules('password', 'Password', 'trim|required|xss_clean');
     $this->form_validation->set_rules('email', 'Email', 'trim|required|xss_clean|valid_email|is_unique[user.user_email]');
     $this->form_validation->set_message('is_unique', 'The %s has been registered');
     if ($this->form_validation->run()) {
         $code = generate_code(12);
         $name = $this->input->post('name');
         $password = $this->input->post('password');
         $email = $this->input->post('email');
         $data = array('user_name' => $name, 'user_password' => enkripsi($password), 'user_email' => $email, 'user_status' => 'active', 'user_created_date' => now(), 'user_image' => 'default.jpg', 'user_registation_reff' => 'web');
         $iduser = $this->model_user->store($data);
         $row = $this->model_user->find($iduser);
         set_userdata('session_user', $row);
         set_userdata('user_level', 'member');
         $outs['msg'] = 'Registration success';
         $outs['flag'] = 1;
     } else {
         $outs['msg'] = validation_errors();
         $outs['flag'] = 0;
     }
     echo json_encode($outs);
 }
开发者ID:ridwanskaterock,项目名称:coc-ri-comunnity,代码行数:24,代码来源:User.php

示例5: enkripsi

					<td><?php 
        echo $nama[$i];
        ?>
</td>
					<td align="center">
						<a href="index.php?p=<?php 
        echo enkripsi($edlink . "&q=" . $id[$i]);
        ?>
" title="Ubah">
							<img src="css/images/edit_f2.png" border="0" width="16" height="16">
						</a>
					</td>
					<td align="center" title="Hapus">
                        <img src="css/images/stop_f2.png" border="0" width="16" height="16" 
                        onclick="del('<?php 
        echo enkripsi($dellink . "&q=" . $id[$i]);
        ?>
')">
					</td>
				</tr><?php 
        $i++;
    }
}
?>
        
	</tbody>
	<tfoot>
		<tr>
			<td colspan="5"><?php 
if ($pagination == "") {
    echo "&nbsp;";
开发者ID:abbeet,项目名称:server39,代码行数:31,代码来源:klasifikasi_surat.php

示例6: enkripsi

          <p align="center">
            <input name="Submit" type="submit" class="button" value="Yes">
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <?php 
if ($BeritaFlag == "1") {
    ?>
			<input name="BnNo" type="button" class="button" id="BnNo" value="No" onClick="location.href='index.php?p=<?php 
    echo enkripsi($kotaksuratlist);
    ?>
'">
            
			<?php 
} else {
    ?>
            <input name="BnNo" type="button" class="button" id="BnNo" value="No" onClick="location.href='index.php?p=<?php 
    echo enkripsi($disposisilist);
    ?>
'">
			
            <?php 
}
?>
          
          </p>
          <p>&nbsp; </p>
          <p>&nbsp; </p>
        </form>
        <p>&nbsp;</p>
        <p>&nbsp;</p></td>
  </tr>
</table>
开发者ID:abbeet,项目名称:server39,代码行数:31,代码来源:disposisi_ask.php

示例7: enkripsi

            </tr>
            <tr>
              <td width="30%" align="center" valign="top">&nbsp;</td>
              <td width="446">
              <input name="Submit" type="submit" class="button" value="Submit">
              <?php 
if ($BeritaFlag == "1") {
    ?>
<input name="BnCancel" type="button" class="button" id="BnCancel" value="Cancel" onClick="Cancel('index.php?p=<?php 
    echo enkripsi($kotaksuratlist);
    ?>
')">
<?php 
} else {
    ?>
<input name="BnCancel" type="button" class="button" id="BnCancel" value="Cancel" onClick="Cancel('index.php?p=<?php 
    echo enkripsi($kotaksuratlist);
    ?>
')">
<?php 
}
?>
                  </td>
            </tr>
      </form>
        
  
</table>
</body>
</html>
开发者ID:abbeet,项目名称:server39,代码行数:30,代码来源:tanggapan_add.php

示例8: mysql_query

	</tbody>
	<tfoot>
		<tr>
			<td colspan="7"><?php 
if ($pagination == "") {
    echo "&nbsp;";
} else {
    echo $pagination;
}
?>
            
            </td>
		</tr>
	</tfoot>
</table>
<?php 
$checkbox = $_POST['checkbox'];
$delete = $_POST['delete'];
if ($delete) {
    for ($i = 0; $i < $totpages; $i++) {
        $del_id = $checkbox[$i];
        $sql = "DELETE FROM berita WHERE IdBerita='" . $del_id . "'";
        $result = mysql_query($sql);
    }
    if ($result) {
        echo "<meta http-equiv=\"refresh\" content=\"0;URL=index.php?p=" . enkripsi($p . "&q=" . $q) . "\">";
    }
}
mysql_close();
?>
</form>
开发者ID:abbeet,项目名称:server39,代码行数:31,代码来源:berita_masuk_list.php

示例9: while

if (is_published("submenu")) {
    ?>
						
                        <div id="submenu-box">
							<div class="t"><div class="t"><div class="t"></div></div></div>
								<div class="m">				
									<ul id="submenu"><?php 
    if ($xmenu['parent'] != "") {
        $parent = $xmenu['parent'];
        $id = $xmenu['id'];
        $link = "";
        while ($parent != "") {
            $omenu2 = xmenu("id, name, parent, src", "id = '" . $id . "'");
            $xmenu2 = mysql_fetch_array($omenu2);
            if ($xmenu2['parent'] != "") {
                $link = "<li><a href=\"index.php?p=" . enkripsi($xmenu2['id']) . "\">" . $xmenu2['name'] . "</a></li>" . $link;
            } else {
                $link = "<li><a href=\"index.php\">" . $xmenu2['name'] . "</a></li>" . $link;
            }
            $parent = $xmenu2['parent'];
            $id = $xmenu2['parent'];
        }
        echo $link;
    } else {
        echo "&nbsp;";
    }
    ?>
										
									</ul>
									<div class="clr"></div>
								</div>
开发者ID:abbeet,项目名称:server39,代码行数:31,代码来源:index.php

示例10: change_password

 public function change_password($id = NULL)
 {
     $this->auth->login_scurity();
     $this->template->title(APP_NAME, "Change Password");
     $this->form_validation->set_rules("newpassword", "New Password", "required");
     $this->form_validation->set_rules("renewpassword", "Re New Password", "required|matches[newpassword]");
     if ($this->form_validation->run()) {
         $data['password'] = enkripsi($this->input->post("newpassword"));
         $this->model_vendor_user->change($id, $data);
         set_flashdata("notif", alert("Berhasil mereset password"));
         redirect("admin/vendor_user/update/" . $id);
     }
     $data['row'] = $this->model_vendor_user->find($id);
     $this->renderAdmin("admin/vendor_user/vendor_user_change_password", $data);
 }
开发者ID:ridwanskaterock,项目名称:coc-ri-comunnity,代码行数:15,代码来源:Vendor_user.php

示例11: reset_password

 public function reset_password($key = NULL)
 {
     if ($key) {
         $row = $this->Model_reset_password->get_reset_password('user', $key);
         if ($row) {
             $today = date('Y-m-d H:i:s');
             $expired = $row->date_created;
             $hourdiff = round((strtotime($today) - strtotime($expired)) / 3600, 1);
             if ($hourdiff >= 24) {
                 $data['message'] = 'Batas waktu telah berakhir';
             } else {
                 $random_password = substr(md5(time()), 0, 6);
                 $data_mailer = array("from" => $this->config->item('email_from'), "to" => $row->email, "subject" => "Success Reset Password", "module" => "vendorUser@SuccessResetPassword", "message" => "Password anda berhasil di reset, silahkan login ke akun anda dengan password " . $random_password);
                 $idmailer = $this->mailer->save($data_mailer);
                 $this->mailer->send_mail($idmailer);
                 $data_user = array("password" => enkripsi($random_password));
                 $result = $this->model_user->update_byemail($row->email, $data_user);
                 $result = $this->Model_reset_password->change($row->idreset_password, array("status" => "done"));
                 if ($result) {
                     $data['message'] = 'Berhasil Reset Password, password akan segera di kirim ke email anda';
                 } else {
                     $data['message'] = 'Gagal Merese Password';
                 }
             }
         } else {
             $data['message'] = 'Link reset password tidak valid';
         }
     } else {
         $data['message'] = 'Key Kosong';
     }
     $data['title'] = 'Reset Password';
     $this->load->view('public/message', $data);
 }
开发者ID:ridwanskaterock,项目名称:coc-ri-comunnity,代码行数:33,代码来源:User.php

示例12: enkripsi

" /></td>
		</tr>
		<tr>
			<td class="key">Urutan</td>
			<td><input type="text" name="ordering" size="5" value="<?php 
echo $ordering;
?>
" /></td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td>			
				<div class="button2-right">
					<div class="prev">
						<a onclick="Cancel('index.php?p=<?php 
echo enkripsi($p_next . "&q=" . $parent);
?>
')">Batal</a>
					</div>
				</div>
				<div class="button2-left">
					<div class="next">
						<a onclick="Btn_Submit('xmenu')">Simpan</a>
					</div>
				</div>
				<div class="clr"></div>
				<input type="submit" style="border: 0pt none ; margin: 0pt; padding: 0pt; width: 0px; height: 0px;" value="Simpan" />
				<input type="hidden" name="xmenu" value="1" />
`				<input type="hidden" name="id" value="<?php 
echo $q;
?>
开发者ID:abbeet,项目名称:server39,代码行数:31,代码来源:menu_ed.php

示例13: while

                                                        </a>
                                                    </li><?php 
                        } else {
                            ?>
													
                                                    <li style="width: 150px;" class="node"><a class="icon-16-category"><?php 
                            echo $topmenu3['name'];
                            ?>
</a>
														<ul style="width: 150px; visibility: hidden;"><?php 
                            while ($topmenu4 = mysql_fetch_array($otopmenu4)) {
                                ?>
																
                                                                <li style="width: 150px;">
                                                                	<a href="index.php?p=<?php 
                                echo enkripsi($topmenu4['id']);
                                ?>
"><?php 
                                $topmenu4['name'];
                                ?>
                                                                    
                                                                    </a>
                                                                </li><?php 
                            }
                            ?>
														
                                                        </ul>
													</li><?php 
                        }
                    }
                    ?>
开发者ID:abbeet,项目名称:server39,代码行数:31,代码来源:topmenu.php

示例14: gmp_div_qr

$i = 1;
do {
    $key = gmp_div_qr(gmp_add(gmp_mul($m, $i), 1), $e);
    $i++;
    if ($i == 1000) {
        // Dengan Perulangan 1000 Kali
        break;
    }
} while (gmp_strval($key[1]) != '0');
// Hasil D = $key[0]
$d = $key[0];
$vald = gmp_strval($d);
// Jika Button Enkripsi ditekan
if (isset($_POST['enkrip']) && !empty($_POST['plain'])) {
    $plain = $_POST['plain'];
    $hasilenkripsi = enkripsi($plain, $n, $e);
} else {
    $hasilenkripsi = 'Ups, Sepertinya Plain Teks Masih Kosong';
}
// Jika Button Deskripsi ditekan
if (isset($_POST['dekrip']) && !empty($_POST['chiper']) && $_POST['chiper'] != 'Ups, Sepertinya Plain Teks Masih Kosong') {
    $chiper = $_POST['chiper'];
    $hasildeskripsi = deskripsi($chiper, $d, $n);
} else {
    $hasildeskripsi[0] = 'Null';
    $hasildeskripsi[1] = 'Ups, Sebelumnya Anda Harus Melakukan Proses Enkripsi';
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<title>Algorithma RSA PHP</title>
开发者ID:senusop,项目名称:ci,代码行数:31,代码来源:rsa.php

示例15: checkauthentication

<?php

checkauthentication();
$id = ekstrak_get(@$get[1]);
$kotaksuratlist = 27;
mysql_query("DELETE FROM berita WHERE IdBerita = '" . $id . "'") or die(mysql_error());
//mysql_query("optimize table suratmasuk") or die(mysql_errno()." : ".mysql_error());
echo "<meta http-equiv=\"refresh\" content=\"0;URL=index.php?p=" . enkripsi($kotaksuratlist) . "\">";
exit;
开发者ID:abbeet,项目名称:server39,代码行数:9,代码来源:berita_masuk_delete.php


注:本文中的enkripsi函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。