VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Encoder/Decoder to send encrypted messages. Encode text, send to friend, decode text, read and repl

by sherif rofael (15 Submissions)
Category: Encryption
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 22nd July 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Encoder/Decoder to send encrypted messages. Encode text, send to friend, decode text, read and reply.

API Declarations


' *************************************************
' http://sherif1.netfirms.com/encoder1.2.zip (whole project)
' (2) ask your friend to do the same
' (3)put any text in the textbox
' (4) press the "encode" button to encode thev text.
' (4)cut and paste this the text and send to ur friend
' (5)your friend will put the text from the e-mail in the text box.
' (6)and then press decode button.

' to use the program without downloading it and only by this code.
' (1)start a project .
' (2)construct a text box and name it "x"
' (3) construct a 2 command boxes
' (4) set the caption of the first "decode"
' (5) set the caption of the first "encode"
'enjoy
' by : sherif rofael.
' mailto : [email protected]
' website:
' http://sherif1.netfirms.com
' http://vbsherif.members.easyspace.com (to download the programs)

Rate Encoder/Decoder to send encrypted messages. Encode text, send to friend, decode text, read and repl



Public rr As String
' how to use :
' (1)download the program
' http://sherif1.netfirms.com/encoder1.2.exe (.exe file)
' http://sherif1.netfirms.com/encoder1.2.zip (whole project)
' (2) ask your friend to do the same
' (3)put any text in the textbox
' (4) press the "encode" button to encode thev text.
' (4)cut and paste this the text and send to ur friend
' (5)your friend will put the text from the e-mail in the text box.
' (6)and then press decode button.

' to use the program without downloading it and only by this code.
' (1)start a project .
' (2)construct a text box and name it "x"
' (3) construct a 2 command boxes
' (4) set the caption of the first "decode"
' (5) set the caption of the first "encode"
'enjoy
' by : sherif rofael.
' mailto : [email protected]
' website:
' http://sherif1.netfirms.com
' http://vbsherif.members.easyspace.com  (to download the programs)

Private Sub Command1_Click()
rrr = "c:\encode.txt"
Open rrr For Output As #1
Print #1, ""
Close #1
y = Len(x)
t = LCase$(Left$(x, 1))
m = dec(t)
For i = 2 To y
tt = LCase$(Left$(x, i))
t = LCase$(Right$(tt, 1))
m = dec(t)
Next i
Open rrr For Input As #1
Line Input #1, mm
x = mm
Close #1
End Sub
Function dec(c)
r = Asc(c)
Select Case r
Case 1 To 60
r = r + 4
Case 61 To 64
r = r - 60
Case 65 To 80
r = r + 10
Case 81 To 90
r = r - 16
Case 91 To 253
r = r + 2
Case 254 To 255
r = r - 163
End Select
v = Chr(r)
rrr = "c:\encode.txt"
Open rrr For Input As #1
Line Input #1, e
Close #1
e = e + v
Open rrr For Output As #1
Print #1, e;
Close #1
'tt = tt + Chr(r)
'x = tt
End Function

Private Sub Command2_Click()
rr = "c:\decode.txt"
Open rr For Output As #1
Print #1, ""
Close #1
y = Len(x)
t = LCase$(Left$(x, 1))
m = enc(t)
For i = 2 To y
tt = LCase$(Left$(x, i))
t = LCase$(Right$(tt, 1))
m = enc(t)
Next i
Open rr For Input As #1
Line Input #1, mm
x = mm
Close #1
End Sub
Function enc(c)
r = Asc(c)
'1 to 60   5 to 64    r=r-4
'61 to 64  1 to 4     r=r+60
'65 to 80  75 to 90   r=r-10
'81 to 90  65 to 74   r=r+16
Select Case r
Case 1 To 4
r = r + 60
Case 5 To 64
r = r - 4
Case 75 To 90
r = r - 10
Case 65 To 74
r = r + 16
Case 93 To 255
r = r - 2
Case 91 To 92
r = r + 163
End Select
v = Chr(r)
rr = "c:\decode.txt"
Open rr For Input As #1
Line Input #1, e
Close #1
e = e + v
Open rr For Output As #1
Print #1, e;
Close #1
'tt = tt + Chr(r)
'x = tt
'rr = "c:\textforme.txt"
'Open rr For Input As #1
'Line Input #1, e
'e = e + r
'tt = tt + Chr(r)
'x = tt
End Function



Download this snippet    Add to My Saved Code

Encoder/Decoder to send encrypted messages. Encode text, send to friend, decode text, read and repl Comments

No comments have been posted about Encoder/Decoder to send encrypted messages. Encode text, send to friend, decode text, read and repl. Why not be the first to post a comment about Encoder/Decoder to send encrypted messages. Encode text, send to friend, decode text, read and repl.

Post your comment

Subject:
Message:
0/1000 characters