• Tidak ada hasil yang ditemukan

Implementasi Algoritma Knapsack dan Algoritma Boldi-Vigna (ζ4) Pada Keamanan dan Kompresi File Teks

N/A
N/A
Protected

Academic year: 2017

Membagikan "Implementasi Algoritma Knapsack dan Algoritma Boldi-Vigna (ζ4) Pada Keamanan dan Kompresi File Teks"

Copied!
7
0
0

Teks penuh

(1)

LISTING PROGRAM

1.

Knapsack

public class Classknapsack{

void Btn_KRClick(object sender, EventArgs e) { richTextBox1.Text = null;

richTextBox1.Text = richTextBox1.Text + w[i] + "\n"; }

Console.WriteLine("Modular inverse does not exist. Decryption aborted");

(2)

for(int i = 0; i < encoded.Length; i++){

(3)

} }

void Btn_generateClick(object sender, EventArgs e) { int temp = 0;

for (int i = 0; i < w.Length; i++){ temp = temp + w[i];

}

textm.Text = (temp + 5).ToString(); }

void Button1Click(object sender, EventArgs e) {

richTextBox4.Text = null; watch.Start();

int[] encoded =

Classknapsack.Encrypt(richTextBox1.Text, beta); watch.Stop();

for(int i = 0;i<encoded.Length;i++) richTextBox4.Text =

richTextBox4.Text + encoded[i].ToString() + "\n"; textBox5.Text =

Math.Round(Convert.ToDecimal(watch.ElapsedMilliseconds)/1000,4) .ToString()+" s";

textBox6.Text = richTextBox4.Text.Length.ToString(); MessageBox.Show("file berhasil dienkripsi");

}

void Btn_DekomdekClick(object sender, EventArgs e) {

richTextBox3.Text = null; watch.Start();

string[] encodeds = richTextBox4.Text.Split((Char)10); int[] encoded = Array.ConvertAll(encodeds, int.Parse); string decoded = Classknapsack.Decrypt(encoded, w, m, n); watch.Stop();

richTextBox3.Text = decoded.ToString(); textBox5.Text =

Math.Round(Convert.ToDecimal(watch.ElapsedMilliseconds)/1000,4) .ToString()+" s";

(4)

2. Boldi Vigna

public static void InsertionSort(int[] freq, String charset){ fr = freq;

cs = charset;

int n = charset.Length;

(5)

public static void boldivigna(String st)

void Button3Click(object sender, EventArgs e) { watch.Start();

String dc = classboldivigna.Decode(richTextBox1.Text); String ds = classboldivigna.Decompress(dc, cs, bolvig); richTextBox4.Text = ds.Substring(0,ds.Length-1);

watch.Stop(); textBox7.Text =

Math.Round(Convert.ToDecimal(watch.ElapsedMilliseconds)/1000,4 ).ToString()+" s";

textBox8.Text = richTextBox4.Text.Length.ToString();

MessageBox.Show("file berhasil didekompresi"); }

void Btn_enkomClick(object sender, EventArgs e) {

richTextBox3.Text = null; watch.Start();

String kalimat = richTextBox4.Text; classboldivigna.boldivigna(kalimat); String stb =

classboldivigna.StringToStb(kalimat,classboldivigna.cs,classbol divigna.bolvig);

String code = classboldivigna.Encode(stb); watch.Stop();

richTextBox3.Text = code; textBox3.Text =

Math.Round(Convert.ToDecimal(watch.ElapsedMilliseconds)/1000,4) .ToString()+" s";

textBox4.Text = richTextBox3.Text.Length.ToString(); MessageBox.Show("file berhasil dikompresi");

(6)

CURRICULUM VITAE

1.

Biodata

2. Riwayat Pendidikan

2012

2016

: S1 Ilmu Komputer Universitas Sumatera Utara, Medan

2009

2012

: SMA Negeri 2 Rantau Selatan

2006

2009

: SMP Swasta Muhammadiyah-35 Sigambal

2000

2006

: SD Negeri 114376 Kebun Sayur

3. Keahlian

Pemrograman

: C#, MATLAB

Database

: MySql

Design

: Photoshop, Corel Draw

Perkantoran

: Microsoft Office

4. Pengalaman Organisasi

[2012

2013]

: Anggota Himpunan Mahasiswa Labuhanbatu

[2012

2014]

: Anggota Ikatan Mahasiswa Ilmu Komputer

Nama

: Erna Lestari

Nim

: 121401024

Alamat Sekarang

: Jln. Air Bersih Ujung, Perumahan D’Green

Townhouse no.3, Medan

Alamat Orang Tua

: Lingk.Kebun Sayur, Sigambal,

Rantau Selatan

(7)

6. Seminar

[2014]

: Seminar Internasional Youth Convention

[2014]

: Seminar Nasional Literasi Informasi “SENARAI”

[2015]

: Seminar Sosialisasi Toward ASEAN Community 2015:

ASEAN Goes to Campus

Referensi

Dokumen terkait

Dari grafik pada Gambar 4.23 dapat diambil kesimpulan waktu yang diperlukan untuk proses kompresi String Heterogen Variable Length Binary Encoding (VLBE) lebih

In the compression process to the string homogenous Variable Length Binary Encoding (VLBE) algorithm is better than Even-Rodeh Code algorithm shows the Compression Ratio on the

In the compression process to the string homogenous Variable Length Binary Encoding (VLBE) algorithm is better than Even-Rodeh Code algorithm shows the Compression Ratio on the

// mengubah strings menajadi stringbits public static

static char[] y ; // static int n ; // static int m ; // static String ngoko ; static String madya ; static String inggil ; static String indo ;. public void KR_start(String pat,

Pada sampel pengujian string homogen, dilihat dari perhitungan RC, CR dan SS algoritma Punctured Elias Codes dan Ternary Comma Code hampir sama baiknya, namun waktu

3) Peserta TRICK (Training Islam Ceria dan Kreatif), UKMI Al-Khuwarizmi, Universitas Sumatera Utara [2013]. 4) Peserta Seminar “What Will You Be?” IMILKOM ,

Sampel yang digunakan pada proses pengujian yaitu String yang terdiri dari satu jenis karakter ( String Homogen) dan String yang terdiri dari beberapa jenis karakter ( String