Decode-Encode
'Öncelikle Form İçerisine Yerleştirmemiz Gereken Nesneleri
'Yazayım.
'txtNormal(Textbox)
'txtSifreli(Textbox)
'cmd_Sifrele(Command Button)
'cmd_Çöz(Command Button)
'Gelelim Kodlara...
Private Sub cmd_Çöz_Click()
Dim Enc, Dec, TEnc, Org As String
txtNormal = txtSifreli
txtSifreli = ""
Dim ttllen, dtime As Integer
txtSifreli.Text = ""
Org = txtNormal.Text
ttllen = Len(txtNormal.Text)
For i = 1 To ttllen
Dec = Mid(Org, i, 1)
Dec = Asc(Dec)
Dec = ((Dec - 10) + 5)
Dec = Chr(Dec)
Dec = Asc(Dec)
Dec = ((Dec - 10) + 2)
Dec = Chr(Dec)
TEnc = TEnc & Dec
Next i
txtSifreli.Text = TEnc
End Sub
-------------------------------------------------
Private Sub cmd_Sifrele_Click()
Dim Enc, Dec, TEnc, Org As String
Dim ttllen As Integer
ttllen = Len(txtNormal.Text)
txtSifreli.Text = ""
Org = txtNormal.Text
For i = 1 To ttllen
Enc = Mid(Org, i, 1)
Enc = Asc(Enc)
Enc = ((Enc + 10) - 5)
Enc = Chr(Enc)
Enc = Asc(Enc)
Enc = ((Enc + 10) - 2)
Enc = Chr(Enc)
TEnc = TEnc & Enc
Next i
txtSifreli.Text = TEnc
End Sub