LAMPIRAN

LISTING PROGRAM

Dim maTR(3) As Integer Dim DeTR, Panjang_teks As Integer Dim PicArr(215, 215), HillArr(0, 3) Dim Sandi As String Dim tmp1(), Panjang, anim

Private Sub Command1_Click() Dialog.Filter = "Text files (*.txt)|*.txt" Dialog.FileName = "" Dialog.ShowOpen If Dialog.FileName "" Then Text1.Text = "" Open Dialog.FileName For Input As #1 Do While Not EOF(1) Input #1, a For j = 1 To Len(a) m1 = Mid(a, j, 1) For i = 1 To Len(Sandi) m = Mid(Sandi, i, 1) If UCase(m1) = m Then Text1.Text = Text1.Text & m1 End If Next i Next j Loop Close #1

Universitas Sumatera Utara

StatusBar1.Panels(1).Text = "Path Message :" & Dialog.FileName End If End Sub

Private Sub Command12_Click() wc = Picture2.Point(1, 190) MsgBox wc End Sub

Private Sub Command2_Click() If Text1.Text = "" Then MsgBox "Enter Your Message Here" Else Encrypt Text1, Text10 STEGANO Picture1 List1.AddItem "0 , 0 " & PicArr(0, 0) List1.AddItem "1 , 0 " & PicArr(1, 0) List1.AddItem "1 , 190 " & PicArr(1, 190) List1.AddItem "2 , 190 " & PicArr(2, 190) List1.AddItem "3 , 190 " & PicArr(3, 190) List1.AddItem "4 , 190 " & PicArr(4, 190)

'Pembatas Panjang Karakter (0,0) dan (0,1) Dim Mystr() bin = Str2Bin(Len(Text10.Text), 16) p1 = Split(PicArr(0, 0), "/") p2 = Split(PicArr(1, 0), "/")

PicArr(0, 0) = Left(p1(0), 4) & Left(bin, 4) & "/" & p1(1) & "/" & Left(p1(2), 4) &_ Mid(bin, 5, 4) PicArr(1, 0) = Left(p2(0), 4) & Mid(bin, 9, 4) & "/" & p2(1) & "/" & Left(p2(2), 4) &_ Right(bin, 4) List2.AddItem "0 , 0 " & PicArr(0, 0)

Universitas Sumatera Utara

List2.AddItem "1 , 0 " & PicArr(1, 0) --------------------------------------------------p3 = Split(PicArr(1, 190), "/") p4 = Split(PicArr(2, 190), "/") p5 = Split(PicArr(3, 190), "/") p6 = Split(PicArr(4, 190), "/")

PicArr(1, 190) = Left(p3(0), 4) & Left(HillArr(0, 0), 4) & "/" & p3(1) & "/" & Left(p3(2),_ 4) & Right(HillArr(0, 0), 4) PicArr(2, 190) = Left(p4(0), 4) & Left(HillArr(0, 1), 4) & "/" & p4(1) & "/" & Left(p4(2),_ 4) & Right(HillArr(0, 1), 4) PicArr(3, 190) = Left(p5(0), 4) & Left(HillArr(0, 2), 4) & "/" & p5(1) & "/" & Left(p5(2),_ 4) & Right(HillArr(0, 2), 4) PicArr(4, 190) = Left(p6(0), 4) & Left(HillArr(0, 3), 4) & "/" & p6(1) & "/" & Left(p6(2),_ 4) & Right(HillArr(0, 3), 4) List2.AddItem "1 , 190 " & PicArr(1, 190) List2.AddItem "2 , 190 " & PicArr(2, 190) List2.AddItem "3 , 190 " & PicArr(3, 190) List2.AddItem "4 , 190 " & PicArr(4, 190) ------------------------------------------------------------ReDim Mystr(Len(Text10.Text)) For i = 1 To Len(Text10.Text) Mystr(i) = Str2Bin(Asc(Mid(Text10.Text, i, 1)), 8) Next i ------------------------------------------------------------awal = 1 For i = 5 To Picture1.ScaleWidth - 1 For j = 1 To Picture1.ScaleHeight - 1 Step 2 List1.AddItem i & " " & j & " " & PicArr(i, j) List1.AddItem i & " " & j + 1 & " " & PicArr(i, j + 1) Mystr1 = Left(Mystr(awal), 4) Mystr2 = Right(Mystr(awal), 4) p7 = Split(PicArr(i, j), "/")

Universitas Sumatera Utara

p8 = Split(PicArr(i, j + 1), "/") PicArr(i, j) = Left(p7(0), 5) & Left(Mystr1, 1) & Mid(p7(0), 7, 1) & Mid(Mystr1, 2, 1) &_ "/" & p7(1) & "/" & Left(p7(2), 5) & Mid(Mystr1, 3, 1) & Mid(p7(2), 7, 1) & Mid(Mystr1, 4,_ 1) PicArr(i, j + 1) = Left(p8(0), 5) & Left(Mystr2, 1) & Mid(p8(0), 7, 1) & Mid(Mystr2, 2,_ 1) & "/" & p8(1) & "/" & Left(p8(2), 5) & Mid(Mystr2, 3, 1) & Mid(p8(2), 7, 1) &_ Mid(Mystr2, 4, 1) List2.AddItem i & " " & j & " " & PicArr(i, j) List2.AddItem i & " " & j + 1 & " " & PicArr(i, j + 1)

If awal = Len(Text10.Text) Then Exit For End If awal = awal + 1 Next j

If awal = Len(Text10.Text) Then Exit For End If Next i MsgBox "Cover Carier has been succes", vbInformation, "SUCCES" End If End Sub

Private Sub Command3_Click() Dialog.FileName = "" Dialog.Filter = "Bitmap Files(*.BMP)|*.BMP|JPG Files(*.JPG)|*.JPG" Dialog.ShowOpen If Dialog.FileName "" Then Picture1.Picture = LoadPicture(Dialog.FileName) Command2.Enabled = True End If StatusBar1.Panels(2).Text = "Path Image Source : " & Dialog.FileName

Universitas Sumatera Utara

End Sub

Private Sub Command4_Click() maTR(0) = Text2.Text maTR(1) = Text3.Text maTR(2) = Text4.Text maTR(3) = Text5.Text

DeTR = maTR(0) * maTR(3) - maTR(1) * maTR(2) Label2.Caption = Str(DeTR) If DeTR Mod 66 = 0 Then MsgBox "Matrix have not Invers value" + vbCrLf + "Inverse Matrix Mod 66 should be_ One" + vbCrLf_ + "Please...Try Again !!!", vbCritical, "WARNING" Text2.SetFocus Else Text6.Text = maTR(3) Text7.Text = maTR(1) * -1 Text8.Text = maTR(2) * -1 Text9.Text = maTR(0) HillArr(0, 0) = Str2Bin(maTR(0), 8) HillArr(0, 1) = Str2Bin(maTR(1), 8) HillArr(0, 2) = Str2Bin(maTR(2), 8) HillArr(0, 3) = Str2Bin(maTR(3), 8) Label22.Caption = Label22 & " " & maTR(0) & " = " & HillArr(0, 0) Label23.Caption = Label23 & " " & maTR(1) & " = " & HillArr(0, 1) Label24.Caption = Label24 & " " & maTR(2) & " = " & HillArr(0, 2) Label25.Caption = Label25 & " " & maTR(3) & " = " & HillArr(0, 3) MsgBox "Matrix Can be Used", vbInformation, "SUCCES" End If End Sub

Public Sub Invers_Matrik() DeTR = ((Val(Text11) * Val(Text14)) - (Val(Text13) * Val(Text12)))

Universitas Sumatera Utara

If DeTR Mod 66 0 Then For i = 1 To 66 If DeTR < 1 Then DeTR = (DeTR Mod 66) + 66 End If If (i * DeTR) Mod 66 = 1 Then maTR(0) = (Text11 * i) Mod 66 maTR(1) = (((Val(Text13) * -1) * i) Mod 66) + 66 maTR(2) = (((Val(Text12) * -1) * i) Mod 66) + 66 maTR(3) = (Text14 * i) Mod 66 Exit For End If Next i Text11 = maTR(0) Text12 = maTR(1) Text13 = maTR(2) Text14 = maTR(3) End If End Sub

Private Sub Command5_Click() Text2.Text = "0" Text3.Text = "0" Text4.Text = "0" Text5.Text = "0" Text6.Text = "" Text7.Text = "" Text8.Text = "" Text9.Text = "" End Sub

Private Sub Command6_Click()

Universitas Sumatera Utara

Bar.Max = Picture1.ScaleWidth For i = 0 To Picture1.ScaleWidth For j = 0 To Picture1.ScaleHeight warna = Split(PicArr(i, j), "/")

r = Bin2Str(warna(0), 8) g = Bin2Str(warna(1), 8) b = Bin2Str(warna(2), 8) Picture2.PSet (i, j), RGB(r, g, b) Next j Bar.Value = Bar.Value + 1 If Bar.Value = Bar.Max Then Bar.Value = Bar.Min MsgBox " Stegano Process is Succes", vbInformation, "OK DEH" Exit For End If Next i End Sub

Private Sub Command7_Click() Dialog.Filter = "Bitmap(*.BMP)|*.BMP" Dialog.ShowSave If Dialog.FileName "" Then SavePicture Picture2.Image, Dialog.FileName End If End Sub

Private Sub Command8_Click() Dim r As Integer, g As Integer, b As Integer Dim r1 As Integer, g1 As Integer, b1 As Integer Dim r2 As Integer, g2 As Integer, b2 As Integer Dim r3 As Integer, g3 As Integer, b3 As Integer Dim r4 As Integer, g4 As Integer, b4 As Integer

Universitas Sumatera Utara

Dim r5 As Integer, g5 As Integer, b5 As Integer w = Picture3.Point(0, 0) w1 = Picture3.Point(1, 0) w2 = Picture3.Point(1, 190) w3 = Picture3.Point(2, 190) w4 = Picture3.Point(3, 190) w5 = Picture3.Point(4, 190) GetWarna w, r, g, b GetWarna w1, r1, g1, b1 GetWarna w2, r2, g2, b2 GetWarna w3, r3, g3, b3 GetWarna w4, r4, g4, b4 GetWarna w5, r5, g5, b5

Text14.Text = Bin2Str(Right(Str2Bin(r2, 8), 4) & Right(Str2Bin(b2, 8), 4), 8) Text13.Text = Bin2Str(Right(Str2Bin(r3, 8), 4) & Right(Str2Bin(b3, 8), 4), 8) Text12.Text = Bin2Str(Right(Str2Bin(r4, 8), 4) & Right(Str2Bin(b4, 8), 4), 8) Text11.Text = Bin2Str(Right(Str2Bin(r5, 8), 4) & Right(Str2Bin(b5, 8), 4), 8) aGab = Right(Str2Bin(r, 8), 4) & Right(Str2Bin(b, 8), 4) & Right(Str2Bin(r1, 8), 4) &_ Right(Str2Bin(b1, 8), 4)

Invers_Matrik STEGANO Picture3

init = 1 For i = 5 To Picture3.ScaleWidth - 1 For j = 1 To Picture3.ScaleHeight - 1 Step 2 D1 = Split(PicArr(i, j), "/") D2 = Split(PicArr(i, j + 1), "/") Dbin = Mid(D1(0), 6, 1) & Mid(D1(0), 8, 1) & Mid(D1(2), 6, 1) & Mid(D1(2), 8, 1) Dbin1 = Mid(D2(0), 6, 1) & Mid(D2(0), 8, 1) & Mid(D2(2), 6, 1) & Mid(D2(2), 8, 1)

Universitas Sumatera Utara

gab = gab & Chr(Bin2Str((Dbin & Dbin1), 8))

If init = Bin2Str(aGab, 16) Then Exit For End If init = init + 1 Next j If init = Bin2Str(aGab, 16) Then 'Bin2Str(aGab, 16) Then Exit For End If Next i Text15.Text = gab Encrypt Text15, Text16 End Sub

Private Sub Command9_Click() Dialog.Filter = "Bitmap(*.BMP)|*.BMP|JPG Files(*.JPG)|*.JPG" Dialog.ShowOpen Picture3.Picture = LoadPicture(Dialog.FileName) End Sub

Private Sub Form_Load() Label2.Caption = "" anim = 0 Sandi = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890~!@#$%^&*()_+=-[]\|}{:;?>