Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: B-TTIE algorithm

  1. #1
    Junior Member
    Join Date
    Oct 2014
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post B-TTIE algorithm

    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!


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: B-TTIE algorithm

    Non-java code moved.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Member Darryl.Burke's Avatar
    Join Date
    Mar 2010
    Location
    Madgaon, Goa, India
    Posts
    494
    Thanks
    8
    Thanked 48 Times in 46 Posts

    Default Re: B-TTIE algorithm

    This thread has been cross posted here:

    http://www.java-forums.org/advanced-java/93118-text-image-algorithm.html

    Although cross posting is allowed, for everyone's benefit, please read:

    Java Programming Forums Cross Posting Rules

    The Problems With Cross Posting


  4. #4
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,520
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: B-TTIE algorithm

    Welcome to the forum! Please read this topic to learn how to post code in code or highlight tags and other useful info for new members.

    Please post your code correctly using code or highlight tags per the above link.

Similar Threads

  1. The B-TTIE algorithm
    By jhonnel in forum The Cafe
    Replies: 2
    Last Post: October 4th, 2014, 04:13 AM
  2. ctt-sp algorithm(cost transitive tournament shortest path algorithm)
    By seeniya in forum Java Theory & Questions
    Replies: 3
    Last Post: April 22nd, 2014, 05:36 AM
  3. Replies: 16
    Last Post: November 21st, 2013, 08:49 AM
  4. Replies: 3
    Last Post: June 10th, 2013, 04:42 AM