Encryptor
Java code:
Private Sub cmdDeleteMessage_Click()
If txtMessage.Text = "" Then
a = MsgBox("No message to delete!", vbInformation, "")
Else: If MsgBox("Do you want to create a new message?", vbYesNo, "New") = vbNo Then Exit Sub
txtMessage.Text = ""
Pic.Picture = LoadPicture()
End If
End Sub
Private Sub cmdEncrypt_Click()
Dim Index As Integer
Call Sleep(200)
If txtMessage.Text = "" Then
reminder = MsgBox("No Message Found!", vbInformation, "")
Exit Sub
End If
a = MsgBox("Are you sure you want to encrypt this message?", vbYesNo, "Reminder")
If a = vbYes Then
Call Encoder
End If
cmdSaveImage.Enabled = True
End Sub
Private Sub cmdOpenText_Click()
Dim SS As String
On Error GoTo a
Me.CommonDialog1.Filter = "Text files (*.txt)|*.txt"
CommonDialog1.ShowOpen
Open CommonDialog1.FileName For Input As #1
Do Until EOF(1)
Input #1, S
SS = SS & S & vbCrLf
Loop
Close #1
a:
txtMessage.Text = SS
End Sub
Private Sub cmdSaveImage_Click()
On Error Resume Next
Me.CommonDialog1.Filter = "Image (*.png)|*.png"
CommonDialog1.Flags = cdlOFNExplorer Or cdlOFNOverwritePrompt
CommonDialog1.ShowSave
Open CommonDialog1.FileName For Output As #1
Print #1, Pic.Image
Close #1
BackPic.Picture = Pic.Image
SavePicture BackPic.Image, CommonDialog1.FileName
End Sub
Private Sub cmdSaveMessage_Click()
If txtMessage.Text = "" Then
note = MsgBox("There is no message to be save!", vbInformation, "")
Else
B = MsgBox("Are you sure you want to save this message?", vbYesNo, "Reminder")
If B = vbYes Then
On Error Resume Next
Me.CommonDialog1.Filter = "Text files (*.txt)|*.txt"
CommonDialog1.Flags = cdlOFNExplorer Or cdlOFNOverwritePrompt
CommonDialog1.ShowSave
Open CommonDialog1.FileName For Output As #1
Print #1, txtMessage.Text
Close #1
End If
End If
End Sub
Private Sub Form_Load()
Pic.Top = 375
Pic.Left = 270
Pic.Width = 3000
Pic.Height = 1800
BackPic.Width = 3000
BackPic.Height = 1800
cmdSaveImage.Enabled = False
End Sub
Private Sub Form_Unload(Cancel As Integer)
End
End Sub
Decryptor
Java Code:
Private Sub cmdDecrypt_Click()
If Pic.Picture = LoadPicture() Then
A = MsgBox("Please select an image", vbInformation, "")
Exit Sub
Else
B = MsgBox("Are you sure you want to decrypt the image?", vbYesNo, "Reminder")
If B = vbYes Then
Call Sleep(200)
Call Decoder
End If
End If
End Sub
Private Sub cmdOpenImage_Click()
On Error GoTo A
Me.CommonDialog1.Filter = "Image (*.png)|*.png"
CommonDialog1.ShowOpen
Open CommonDialog1.FileName For Input As #1
Do Until EOF(1)
Input #1, S
Pic.Picture = LoadPicture(CommonDialog1.FileName)
Loop
Close #1
A:
txtMessage.Text = ""
txtMessage.Enabled = True
End Sub
Private Sub cmdSaveMessage_Click()
If txtMessage.Text = "" Then
A = MsgBox("There's no message!", vbInformation, "")
Else
B = MsgBox("Are you sure you want to save this message?", vbYesNo, "")
If B = vbOK Then
On Error Resume Next
Me.CommonDialog1.Filter = "Text files (*.txt)|*.txt"
CommonDialog1.Flags = cdlOFNExplorer Or cdlOFNOverwritePrompt
CommonDialog1.ShowSave
Open CommonDialog1.FileName For Output As #1
Print #1, txtMessage.Text
Close #1
End If
End If
End Sub
Private Sub Form_Load()
Pic.Top = 375
Pic.Left = 270
Pic.Width = 3000
Pic.Height = 1800
'Pic.Line (0, 0)-(199, 119), RGB(0, 0, 0), B
End Sub
Is these codes of the Block cipher encryptor for text-to-image algorithm (B-TTIE algorithm) by Abusukhon 2013? If not, can someone help to make it the same with B-TTIE algorithm? Thank you vey much!