Public Function Encrypt(ByVal Teks As String) As String
Dim Panjang_Teks As Integer
Dim Teks_Baru As String
Karakter = ""
Panjang_Teks = Len(Teks)
For i = 1 To Panjang_Teks
Karakter = Mid(Teks, i, 1)
Select Case Asc(Karakter)
Case 65 To 90 'huruf besar
Karakter = Chr(Asc(Karakter) + 100)
Case 97 To 122 'huruf kecil
Karakter = Chr(Asc(Karakter) + 100)
Case 48 To 57 'angka
Karakter = Chr(Asc(Karakter) + 100)
Case 32 'spaci
Karakter = Chr(32)
End Select
Teks_Baru = Teks_Baru + Karakter
Next
Encrypt = Teks_Baru
End Function
Public Function Decrypt(ByVal Teks As String) As String
Dim Panjang_Teks As Integer
Dim Teks_Baru As String
Karakter = ""
Panjang_Teks = Len(Teks)
For i = 1 To Panjang_Teks
Karakter = Mid(Teks, i, 1)
Select Case Asc(Karakter)
Case 165 To 190
Karakter = Chr(Asc(Karakter) - 100)
Case 197 To 222
Karakter = Chr(Asc(Karakter) - 100)
Case 148 To 157
Karakter = Chr(Asc(Karakter) - 100)
Case 32
Karakter = Chr(32)
End Select
Teks_Baru = Teks_Baru + Karakter
Next
Decrypt = Teks_Baru
End Function
Private Sub Command1_Click()
Text2 = Encrypt(Text1)
End Sub
Private Sub Command2_Click()
Text3 = Decrypt(Text2)
End Sub
check this out for example encrypt decrypt with vb 06
Grand Theft Auto 4 Cheats
11 tahun yang lalu
Tidak ada komentar:
Posting Komentar