SillyCypher

Here you can attach your files or example so others can use it, discussions needs to be done at the general board
Post Reply
albert
Posts: 24
Joined: Wed Jun 24, 2009 12:39 am

SillyCypher

Post: # 438Post albert
Wed Jun 24, 2009 11:35 pm

dim textin as string

object myform as form
           myform.Height = 435
           myform.Width = 320
           myform.Caption = "Silly Cypher Version 1.0"
     object input as Richedit
           input.Top = 0
           input.width = 300
           input.HideScrollBars = false
           input.ScrollBars = ssBoth
           input.WordWrap = false
     end object

     object mytext1 as edit
           mytext1.Top = 100
           mytext1.Text = "a"
     end object

     object mytext2 as edit
           mytext2.Top = 125
           mytext2.Text = "A"
     end object            

     object mytext3 as edit
           mytext3.Top = 150
           mytext3.Text = "b"
     end object            

     object mytext4 as edit
           mytext4.Top = 175
           mytext4.Text = "B"
     end object      

     object mytext5 as edit
           mytext5.Top = 200
           mytext5.Text = "c"
     end object

     object mytext6 as edit
           mytext6.Top = 225
           mytext6.Text = "C"
     end object            

     object mytext7 as edit
           mytext7.Top = 250
           mytext7.Text = "d"
     end object            

     object mytext8 as edit
           mytext8.Top = 275
           mytext8.Text = "D"
     end object      

     object output as richedit
           output.Top = 300
           output.Width = 300
           output.ScrollBars = ssvertical
           output.ReadOnly = true
     end object

     object cypher as button
           onclick=cypher
           left = 200
           top = 150
           caption="cypher"
     end object

     object decypher as button
           onclick=decypher
           left = 200
           top = 200
           caption="decypher"
     end object

     object help as button
           onclick=helper
           left = 200
           top = 250
           caption="help"
     end object


end object

myform.ShowModal

sub cypher(textin as string)
     dim counter as integer
     dim counter2 as integer
     dim a as integer
     dim bin as string
     dim bin2 as string
     dim textout as string
     dim words(7) as string
     dim bytes(7) as string
     textin = ""
     textout = ""
     bin = ""
     bin2=""
     counter = 0
     counter2=0
     a = 0

     words(0) = mytext1.Text + " "
     words(1) = mytext2.Text + " "
     words(2) = mytext3.Text + " "
     words(3) = mytext4.Text + " "
     words(4) = mytext5.Text + " "
     words(5) = mytext6.Text + " "
     words(6) = mytext7.Text + " "
     words(7) = mytext8.Text + " "
     bytes(0) = "000"
     bytes(1) = "001"
     bytes(2) = "010"
     bytes(3) = "011"
     bytes(4) = "100"
     bytes(5) = "101"
     bytes(6) = "110"
     bytes(7) = "111"

     output.clear
     textin = input.Text
     for counter = 1 to len(textin)
           a = ASC ( mid$(textin,counter,1))
           bin = right$("00000000" + bin$(a),8)
           bin = "1" + bin

           for counter2 = 1 to 9 step 3
                       bin2 = mid$(bin,counter2,3)

                       FOR a = 0 TO 7
                             if bytes(a) = bin2 then textout=textout+words(a)
                       next

           next

     next
     output.Text = textout
end sub

sub decypher(textin as string)
     textin = input.Text
           dim words(7) as string
           dim bytes(7) as string
           dim counter as integer
           dim counter2 as integer
           dim bin as string
           dim text as string
           dim a as integer
           dim textout as string
           textout = ""
           bin = ""
           text = ""

     words(0) = mytext1.Text + " "
     words(1) = mytext2.Text + " "
     words(2) = mytext3.Text + " "
     words(3) = mytext4.Text + " "
     words(4) = mytext5.Text + " "
     words(5) = mytext6.Text + " "
     words(6) = mytext7.Text + " "
     words(7) = mytext8.Text + " "
     bytes(0) = "000"
     bytes(1) = "001"
     bytes(2) = "010"
     bytes(3) = "011"
     bytes(4) = "100"
     bytes(5) = "101"
     bytes(6) = "110"
     bytes(7) = "111"
`print textin

     for counter = 1 to len(textin)
           text = text+mid$(textin,counter,1)
           `print text
           if mid$(textin,counter,1)= " " then
                 for counter2 = 0 to 7
                       if words(counter2) = text then
                             bin = bin + bytes(counter2)
                             `print bin
                       end if
                 next
                 text=""
           end if
     next
     a=0
     for counter = 1 to len(bin) step 9
           text = mid$(bin,counter,9)
           `print text
           if mid$(text,2,1) = "1" then a=a+128
           if mid$(text,3,1) = "1" then a=a+64
           if mid$(text,4,1) = "1" then a=a+32
           if mid$(text,5,1) = "1" then a=a+16
           if mid$(text,6,1) = "1" then a=a+8
           if mid$(text,7,1) = "1" then a=a+4
           if mid$(text,8,1) = "1" then a=a+2
           if mid$(text,9,1) = "1" then a=a+1
           textout=textout+chr$(a)
           a=0
     next
     output.text = textout
end sub

sub helper()
     dim cr as string
     dim lf as string
     cr = chr$(13)
     lf = chr$(10)
     showmessage "Silly Cypher Version 1.0  By Albert Redditt June 2009 " + cr+lf+ "Enter your message in the top window and click Cypher."+cr+lf+"Tab to or click on output window at bottom." +cr+lf+"Select output with shift and down arrow." +cr+lf+"CTRL-C to copy."+cr+lf+"CTRL-V to paste into another app."+cr+lf+"You can alter the 8 words to suit your needs."+cr+lf+"Copy cyphered text into input box and click on DeCypher."
     
end sub
Attachments
SillyCypher.zip
(333.63 KiB) Downloaded 404 times

albert
Posts: 24
Joined: Wed Jun 24, 2009 12:39 am

SillyCypher

Post: # 439Post albert
Fri Jun 26, 2009 3:11 am

Last version its all done can`t add any more to it.

this one is 12 bit but it still cyphers 3 bit blocks but i nested 4 random bits throught the byte.

Have fun its officially abandoned.
Attachments
SillyCypher2.zip
(335.37 KiB) Downloaded 403 times

albert
Posts: 24
Joined: Wed Jun 24, 2009 12:39 am

SillyCypher

Post: # 440Post albert
Tue Jun 30, 2009 2:38 am

Here is Version 3.

Its a full 256 bit. 32 bytes input 1024 bits output.


I just uploaded the bug fix for the file save and load its not backwards compatible.

a second bugfix 002.zip
Attachments
Cyph256V3_001.zip
(338.05 KiB) Downloaded 396 times

albert
Posts: 24
Joined: Wed Jun 24, 2009 12:39 am

SillyCypher

Post: # 441Post albert
Mon Jul 06, 2009 3:17 pm

Here is a 512 bit version based on the 256 one
I just doubled the numbers and added 4 new panels

its not backwards compatible with the 256 version this one works with larger block sizes.
Attachments
Cyph512V1.zip
(338.48 KiB) Downloaded 374 times

albert
Posts: 24
Joined: Wed Jun 24, 2009 12:39 am

SillyCypher

Post: # 442Post albert
Mon Jul 06, 2009 3:20 pm

I doubled it again to 1024 bit

this is not backwards compatible with the 512 or 256 it works with larger block sizes


fully functional and cool looking data encryption engine.


This is 1024 bit it has 16 panels of numbers 1 to 1024
Attachments
Cyph1024V1.zip
(339.39 KiB) Downloaded 421 times

Post Reply