buat 3 textbox dan 2 comand button
buat module
list form
Option Explicit
Private Sub Command1_Click()
Text2 = EncryptText(Text1, "gila")
End Sub
Private Sub Command2_Click()
Text3 = DecryptText(Text2, "gila")
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
list module
Option Explicit
#Const CASE_SENSITIVE_PASSWORD = False
'Encrypt text
Public Function EncryptText(strText As String, ByVal strPwd As String) As String
Dim i As Integer, c As Integer
Dim strBuff As String
#If Not CASE_SENSITIVE_PASSWORD Then
'Convert password to upper case
'if not case-sensitive
strPwd = UCase$(strPwd)
#End If
'Encrypt string
If Len(strPwd) Then
For i = 1 To Len(strText)
c = Asc(Mid$(strText, i, 1))
c = c + Asc(Mid$(strPwd, (i Mod Len(strPwd)) + 1, 1))
strBuff = strBuff & Chr$(c And &HFF)
Next i
Else
strBuff = strText
End If
EncryptText = strBuff
End Function
Public Function DecryptText(strText As String, ByVal strPwd As String)
Dim i As Integer, c As Integer
Dim strBuff As String
#If Not CASE_SENSITIVE_PASSWORD Then
'Convert password to upper case
'if not case-sensitive
strPwd = UCase$(strPwd)
#End If
'Decrypt string
If Len(strPwd) Then
For i = 1 To Len(strText)
c = Asc(Mid$(strText, i, 1))
c = c - Asc(Mid$(strPwd, (i Mod Len(strPwd)) + 1, 1))
strBuff = strBuff & Chr$(c And &HFF)
Next i
Else
strBuff = strText
End If
DecryptText = strBuff
End Function
free sms
Kolom
- Internet (6)
- Hacking (5)
- Visual Basic (5)
- Linux (3)
- Trik Unik (3)
- Virus (3)
- Komputer Maintenance (2)
- Trick Laptop (2)
Request problem
TipsTrikSmall Headline Animator
Langganan:
Posting Komentar (Atom)
print this page
Entri Top
-
Langkah Pertama Copy terlebih dahulu semua file yang ada di file iso slax yang telah kita download. Kemudian dengan menggunakan text editor ...
-
Berikut Merupakan Rangkuman Masalah dan kendala Yang sering Pengguna Komputer Hadapi dan Bagaimana Cara Pencegahannya : 1. Komputer Tidak M...
-
Perintah yang biasa digunakan dalam manajemen direktori antara lain: mkdir = membuat direktori (make directory) rmdir ...
0 komentar:
Posting Komentar