kripto: Added tugas 1.
Signed-off-by: Willy Sudiarto Raharjo <willysr@gmail.com>
This commit is contained in:
@@ -0,0 +1,89 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>Willy Sudiarto Raharjo - Tugas 1 Kriptografi - Semester Gasal 2023/2024</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta name="author" content="Willy Sudiarto Raharjo">
|
||||
<style type="text/css">
|
||||
@import url(index.css);
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="Title">
|
||||
TUGAS 1 KRIPTOGRAFI SEMESTER GASAL 2023/2024
|
||||
</div>
|
||||
<p>Anda diminta untuk membuat sebuah program yang bisa menerima input berupa plaintext dan mengubahnya menjadi ciphertext dengan ketentuan sebagai berikut:</p>
|
||||
<ol>
|
||||
<li>Input berupa plain ASCII huruf kecil (a-z) tanpa ada angka dan spasi</li>
|
||||
<li>Seluruh isi teks akan diproses per karakter kunci
|
||||
<ul>
|
||||
<li>Kunci A berarti tidak ada perubahan</li>
|
||||
<li>Kunci B berarti geser 1 posisi (a->b, b->c, z->a, dst)</li>
|
||||
<li>Kunci C berarti geser 2 posisi (a->c, b->d, z->b, dst)</li>
|
||||
<li>dan seterusnya</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ol>
|
||||
Contoh:
|
||||
<pre>
|
||||
Plaintext: aku
|
||||
Kunci: diam
|
||||
Output:
|
||||
Karakter ke-1 kunci: dnx (d)
|
||||
Karakter ke-2 kunci: lvf (i)
|
||||
Karakter ke-3 kunci: lvf (a)
|
||||
Karakter ke-4 kunci: xhr (m)
|
||||
ciphertext: <strong>xhr</strong></pre>
|
||||
<form action="check.php" method="POST">
|
||||
Input Plaintext: <br />
|
||||
<textarea cols="60" rows="10" name="plaintext"></textarea><br />
|
||||
Input Kunci: <br/>
|
||||
<input type="text" name="key"></input><br/>
|
||||
<input type="submit" name="submit" value="Encrypt">
|
||||
</form>
|
||||
<div class="Notes-Title">
|
||||
Catatan :
|
||||
</div>
|
||||
<div class="Notes">
|
||||
<ol>
|
||||
<li>Input boleh huruf besar/kecil</li>
|
||||
<li>Input hanya berupa alphabet</li>
|
||||
<li>Input tidak boleh mengandung spasi</li>
|
||||
</ol>
|
||||
</div>
|
||||
<p class="LastUpdate">
|
||||
<?php
|
||||
$filename = 'index.php';
|
||||
if (file_exists($filename))
|
||||
{
|
||||
date_default_timezone_set("Asia/Jakarta");
|
||||
$tanggal = date("d", filemtime($filename));
|
||||
if (substr($tanggal,0,1)==0)
|
||||
$tanggal=substr($tanggal,-1);
|
||||
$bulan = date("m", filemtime($filename));
|
||||
switch ($bulan)
|
||||
{
|
||||
case 1 : $bulan_id="Januari"; break;
|
||||
case 2 : $bulan_id="Februari"; break;
|
||||
case 3 : $bulan_id="Maret"; break;
|
||||
case 4 : $bulan_id="April"; break;
|
||||
case 5 : $bulan_id="Mei"; break;
|
||||
case 6 : $bulan_id="Juni"; break;
|
||||
case 7 : $bulan_id="Juli"; break;
|
||||
case 8 : $bulan_id="Agustus"; break;
|
||||
case 9 : $bulan_id="September"; break;
|
||||
case 10 : $bulan_id="Oktober"; break;
|
||||
case 11 : $bulan_id="November"; break;
|
||||
case 12 : $bulan_id="Desember"; break;
|
||||
}
|
||||
$tahun = date("Y", filemtime($filename));
|
||||
$jam = date("H:i:s", filemtime($filename));
|
||||
echo "Update Terakhir : " . $tanggal . " " . $bulan_id . " " . $tahun . " :: " . $jam . "\n";
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
<div class="Info">
|
||||
Willy Sudiarto Raharjo
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user