LISTING PROGRAM
a.
Fungsi Cari File Enkripsi
privatevoid btn_cari_Click(object sender, EventArgs e) {
OpenFileDialog dialog = newOpenFileDialog();
dialog.Filter = "Document (MsWord)|*.doc| PDF|*.pdf"; dialog.Title = "Open File : ";
dialog.RestoreDirectory = true;
if (dialog.ShowDialog() == DialogResult.OK) {
tipe = dialog.FileName.Substring(dialog.FileName.Length - 3,3);
if (tipe == "doc") {
tb_loc.Text = dialog.FileName; tb_cari.Text =
System.IO.Path.GetFileName(dialog.FileName); }
elseif (tipe == "pdf") {
baca = newPdfReader(dialog.FileName); tb_loc.Text = dialog.FileName;
tb_cari.Text =
System.IO.Path.GetFileName(dialog.FileName); }
}
}
b.
Fungsi Buka File Enkripsi
privatevoid btn_buka_Click(object sender, EventArgs e) {
if (tipe == "doc") {
Microsoft.Office.Interop.Word.Application wordApp = new Microsoft.Office.Interop.Word.ApplicationClass(); object filenameO = tb_loc.Text.ToString();
object objFalse = false; object objTrue = true;
object missing = System.Reflection.Missing.Value; object emptyData = string.Empty;
Microsoft.Office.Interop.Word.Document aDoc = wordApp.Documents.Open(ref filenameO, ref objFalse, ref objTrue, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref objTrue, ref missing, ref missing, ref missing, ref missing);
IDataObject data = System.Windows.Forms.Clipboard.GetDataObject();
String fileText =
data.GetData(System.Windows.Forms.DataFormats.Text).ToString();
System.Windows.Forms.Clipboard.SetDataObject(string.Empty);
tb_preview.Text = fileText;
} else
{
int intPageNum = baca.NumberOfPages; string[] words;
string line, text; string temp = "";
for (int i = 1; i <= intPageNum; i++) {
text = PdfTextExtractor.GetTextFromPage(baca, i,
newLocationTextExtractionStrategy());
words = text.Split('\n'); for (int j = 0, len = words.Length; j < len; j++) {
line =
Encoding.UTF8.GetString(Encoding.UTF8.GetBytes(words[j]));
temp += line + Environment.NewLine; }
}
tb_preview.Text = temp; }
}
c.
Fungsi Menghitung Jumlah Karakter
privatevoid btn_hitung_Click(object sender, EventArgs e) {
int jj = tb_preview.Text.Length; string pjg = jj.ToString(); tb_jmlkar.Text = pjg; }
d.
Fungsi Enkripsi Acak Kunci Zig-zag Cipher
int n; int[] M;
bool flag=false;
privatevoid btn_acakzig_Click(object sender, EventArgs e) {
Random rnd = newRandom();
n = rnd.Next(2, 100); M = newint[n];
int j = 1;
M[i] = j;
tb_enkzig.Text = cipher + cipher1; p.Stop();
timezig = (int.Parse(p.Elapsed.ToString("fffffff")) / 10000f).ToString();
}
f.
Fungsi Acak Kunci RC4
+string timezig;
Cipher
char[] kar = {' ', '!', '\"', '#', '$', '%', '&', '\'', '(', ')','*','+',',',
'-','.','/','0','1','2','3','4','5','6','7','8','9',':',';','<','=','>','?','@','
A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T',
'U','V','W','X','Y','Z','[','\\',']','^','_','`','a','b','c','d','e','f','g','h
','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','{','
|','}','~','Ɗ'};
privatevoid btn_acakrc4_Click(object sender, EventArgs e) {
Random rnd = newRandom();
string kunci2 = ""; int r, n;
n = rnd.Next(tb_enkzig.Text.Length); for (int i = 0; i < n; i++)
{
r = rnd.Next(0, kar.Length); kunci2 += kar[r];
}
tb_enk_acakrc4p.Text = kunci2; }
g.
Fungsi Key Scheduling Algorithm (KSA)
privateint[] S = null; publicvoid KSA(string key) {
S = newint[256]; int pjgKey = key.Length; if (pjgKey < 1)
MessageBox.Show("Kunci tidak boleh kosong");
for (int i = 0; i <= 255; i++) S[i] = (byte)i;
int j = 0;
for (int i = 0; i <= 255; i++) {
j = (j + S[i] + key[i % pjgKey]) % 256; int iTmp = S[i];
S[i] = S[j]; S[j] = iTmp; }
}
privatevoid btn_enkrc4p_Click(object sender, EventArgs e) {
Stopwatch q = newStopwatch();
q.Start();
string cipher = "", plain = tb_enkzig.Text; KSA(tb_enk_acakrc4p.Text); int i = 0, j = 0, a, c, z;
Tabel t = newTabel();
for (int k = 0; k < plain.Length; k++) {
i = (i + 1) % 256; a = S[i];
j = (j + a) % 256;
int b = S[j];
S[i] = b; S[j] = a;
c = (S[((i << 5) ^ (j >> 3)) % 256] + S[((j << 5) ^ (i >> 3)) % 256]) % 256;
z = ((S[(a + b) % 256] + S[(c ^ 170) % 256]) ^ S[(j + b) % 256]) % 256;
cipher += t.getChar((t.getDesimal(plain[k]) ^ z) % 256); }
tb_enkrc4p.Text = cipher; q.Stop();
string timerc4p = (int.Parse(q.Elapsed.ToString("fffffff")) / 10000f).ToString();
tb_ratarata.Text = ((double.Parse(timezig) + double.Parse(timerc4p)) / 2).ToString() + " ms"; }
i.
Fungsi Simpan Enkripsi
privatevoid btn_simpan_enk_Click_1(object sender, EventArgs e) {
SaveFileDialog simpan = newSaveFileDialog();
simpan.Filter = "Super Enkripsi(*.inda)|*.inda"; simpan.FileName = "*.inda";
if (simpan.ShowDialog() == DialogResult.OK) {
FileStream fstream = newFileStream(simpan.FileName, FileMode.OpenOrCreate);
StreamWriter sw = newStreamWriter(fstream);
SeekOrigin seekorigin = newSeekOrigin();
sw.BaseStream.Seek(0, seekorigin); sw.WriteLine(tb_enkrc4p.Text); sw.Flush();
sw.Close();
string filenamee = simpan.FileName.Substring(0, simpan.FileName.Length - 5) + "a.dat";
FileStream fstreamm = newFileStream(filenamee, FileMode.OpenOrCreate);
StreamWriter sww = newStreamWriter(fstreamm);
SeekOrigin seekoriginn = newSeekOrigin();
sww.WriteLine(tb_enk_acakrc4p.Text);
sww.WriteLine(tb_preview.Text.Length.ToString()); sww.WriteLine(rad_enk_baris.Checked);
sww.Flush(); sww.Close(); }
}
j.
Fungsi Cari File Dekripsi
string pilihan;
privatevoid btn_cari_dek_Click(object sender, EventArgs e) {
OpenFileDialog open = newOpenFileDialog();
open.Filter = "Super Enkripsi File(*.inda)|*.inda"; if (open.ShowDialog() == DialogResult.OK)
{
tb_cari1.Text = open.FileName; tb_loc1.Text = open.FileName;
string namaa = open.FileName.Substring(0, open.FileName.Length - 5) +
"a.dat";
FileStream fstreamm = newFileStream(namaa, FileMode.Open,
FileAccess.ReadWrite);
StreamReader sreaderr = newStreamReader(fstreamm);
sreaderr.BaseStream.Seek(0, SeekOrigin.Begin); kuncizig = sreaderr.ReadLine();
kunciplus = sreaderr.ReadLine(); len = int.Parse(sreaderr.ReadLine()); pilihan = sreaderr.ReadLine();
sreaderr.Close();
string nama = open.FileName.Substring(0, open.FileName.Length);
FileStream fstream = newFileStream(nama, FileMode.Open,
FileAccess.ReadWrite);
StreamReader sreader = newStreamReader(fstream);
sreader.BaseStream.Seek(0, SeekOrigin.Begin); hasilenk = sreader.ReadLine();
sreader.Close(); }
}
k.
Fungsi Buka File Dekripsi
privatevoid btn_buka_dek_Click(object sender, EventArgs e) {
tb_preview1.Text = hasilenk; tb_dek_acakzig.Text = kuncizig; tb_dek_acakrc4p.Text = kunciplus; if (pilihan == "True")
{
rad_dek_baris.Checked = true; }
else
{
rad_dek_kolom.Checked = true; }
l.
Fungsi Dekripsi Algoritma Zig-zag Cipher
string hasilenk, kuncizig, kunciplus; int len;
privatevoid btn_dekzig_Click(object sender, EventArgs e) {
for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) {
plain += arr[i, j]; }
}
}
//kolom
elseif (rad_dek_kolom.Checked == true) {
for (int i = 0; i < M.Length; i++) {
temp1 = temp.Substring(0, n);
temp = temp.Substring(n, temp.Length - n); for (int j = 0; j < n; j++)
{ if (j % 2 == 0)
{
arr[j, M[i] - 1] = temp1[j].ToString(); }
else
{ if (M[i] >= n)
arr[j, 0] = temp1[j].ToString(); else
arr[j, M[i]] = temp1[j].ToString(); }
} }
for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) {
plain += arr[i, j]; }
} } }
tb_dekzig.Text = plain.Substring(0, len);
}
m.
Fungsi Dekripsi Algoritma RC4
+privatevoid btn_dek_rc4p_Click(object sender, EventArgs e)
Cipher
{
string plain = "", cipher = tb_preview1.Text; KSA(tb_dek_acakrc4p.Text);
int i = 0, j = 0, a, c, z;
Tabel t = newTabel();
for (int k = 0; k < cipher.Length; k++) {
j = (j + a) % 256;
int b = S[j];
S[i] = b; S[j] = a;
c = (S[((i << 5) ^ (j >> 3)) % 256] + S[((j << 5) ^ (i >> 3)) % 256]) % 256;
z = ((S[(a + b) % 256] + S[(c ^ 170) % 256]) ^ S[(j + b) % 256]) % 256;
plain += t.getChar((t.getDesimal(cipher[k]) ^ z) % 256); }
string plain1;
plain1 = plain.Replace("Ā", "" + System.Environment.NewLine); tb_dekrc4p.Text = plain1;
}
n.
Fungsi Simpan Dekripsi
privatevoid btn_simpan_dek_Click(object sender, EventArgs e) {
SaveFileDialog simpan = newSaveFileDialog();
simpan.Filter = "Document (MsWord)|*.doc"; simpan.FileName = "*.doc";
if (simpan.ShowDialog() == DialogResult.OK) {
File.WriteAllText(simpan.FileName, tb_dekzig.Text.ToString()); }
CURRICULUM VITAE
DATA DIRI
Nama Lengkap
: Noer Inda Chayanie
Nama Panggilan
: Inda
Tempat/Tanggal Lahir
: Medan/23 Mei 1995
Jenis Kelamin
: Perempuan
Agama
: Islam
Kebangsaan
: Indonesia
Alamat
: Jl. Beringin Komplek Wartawan No. 4A
Medan Timur, Sumatera Utara
Nomor HP
: +6282366003327
: noerinda@hotmail.com
RIWAYAT PENDIDIKAN
S1 Ilmu Komputer
Universitas Sumatera Utara, Medan
131401122
Sekolah Menengah Atas
SMAN 3 MEDAN
2010-2013
Sekolah Menengah Pertama
SMP SWASTA PERTIWI MEDAN
2007-2010
Sekolah Dasar
No.
Nama Seminar/Kursus/Workshop
Tahun
1
GIT Repository
2017
2
Global Inspiring Seminar of Indonesia Next Program 2016
2016
3
Seminar Nasional Literasi Indormasi (SENARAI)
2014
4
Seminar What Will You Be
2013
5
Pelatihan Dasar Organisasi IMILKOM
2014
6
Bimbingan Belajar Nurul Fikri
2013
7
Kursus Musik Medan Musik
2005
Bahasa Pemrograman
: C++, Java for Mobile, C#, HTML
DMBS
: MySQL
Software
:Office Application
Lainnya
:Musik
PENGALAMAN ORGANISASI
No Organisasi Posisi Tahun
1 IMILKOM USU Kepala Biro Administrasi dan
Kesekretariatan 2016-sekarang
2 IMILKOM USU Anggota Komunikasi dan
Informasi 2015-2016
3 Porseni IMILKOM 2015 Anggota Humas 2015
4 Ilmu Komputer Goes To School
2014 Sekretaris 2014
5 Palang Merah Remaja Anggota 2010-2013