This is code for Encrypt and Decrypt. this a simple logic of encryption. Please leave comment or feedback if this code helps you. Thanks. Jery. :)
the encrypt function place in a module.
This Code needed :
1 Module
1 combo box (For input before encryption) text1 in this program
2 label (For encryption result and encryption reading) --> label1 and label 3 in this program

'in a Module
' Encryption Methode by Jery M
Function Enkripsi(word As String) As String
Dim temp, temp2 As Integer
Dim temp3, temp4, temp5 As String
' file enkription
If Len(word > 0) Then
    ReDim CharacterValue(Len(word) - 1) As Byte
    For i = 0 To (Len(word) - 1)
    temp = Asc(Mid(word, i + 1, 1)) + 77
    If (temp > 255) Then temp = temp - 255
    CharacterValue(i) = CByte(temp)
    Next i
 
End If
End Function


'In a Form
' Encryption Methode by Jery M
Private Sub Form_Load()

End Sub

Private Sub Label1_Change()
Dim CriptVariable As Integer
Dim StringBuffer As String

If Len(Label1.Caption) > 0 Then
    'change data from label1 back to ke label3
    ReDim CharacterValue(Len(Label1.Caption) - 1) As Byte
    For i = 0 To (Len(Label1.Caption) - 1)
    CriptVariable = Asc(Mid(Label1.Caption, i + 1, 1)) - 77
    If CriptVariable < 0 Then CriptVariable = CriptVariable + 255
    CharacterValue(i) = CByte(CriptVariable)
    Next i
    'show it in label3
    StringBuffer = vbNullString
    For i = 0 To (Len(Label1.Caption) - 1)
    StringBuffer = StringBuffer & Chr(CharacterValue(i))
    Next i
    Label3.Caption = StringBuffer

Else
    MsgBox "empty"
End If
End Sub


Private Sub Text1_Change()
Dim CriptVariable As Integer
Dim StringBuffer As String
'Ambil data yang akan dan dienkripsi

If Len(Text1.Text) > 0 Then
    ReDim CharacterValue(Len(Text1.Text) - 1) As Byte
    For i = 0 To (Len(Text1.Text) - 1)
    CriptVariable = Asc(Mid(Text1.Text, i + 1, 1)) + 77
    If (CriptVariable > 255) Then CriptVariable = CriptVariable - 255
    CharacterValue(i) = CByte(CriptVariable)
    Next i
    'show encryption in label1
    StringBuffer = vbNullString
    For i = 0 To (Len(Text1.Text) - 1)
    StringBuffer = StringBuffer & Chr(CharacterValue(i))
    Next i
    Label1.Caption = StringBuffer
   Else
    Label1.Caption = vbNullString
End If
End Sub

>> please send me another codes for Email Address:mansoor480@gmail.com

i m sorry mansoor but you must browsing this forum to get many codes here. we supplied it for free so used it with a wise.

Hi,I wont to learn how i create vb program. please tell me about it. I am a student. please tell me all about it.

Hi,I wont to learn how i create vb program. please tell me about it. I am a student. please tell me all about it.

post your question in vb section. you can learn anything there. fell free to asked from others.

can you help me to give several examples of inscription program especially text inscription using RC4 and WAKE's methods.
Thank you so much for your help.
Best Regards,
Meta

hi good day...thanks for your code!!!...as for now I'm looking forward to your new post.I want to ask if do you have a source code for encryption and decryption of password in database?preferably in MS ACCESS.Rignt now I'm studying your codes if I can Integrate it with my Project.......Thanks and God Bless!!!!

Am doing a project based on ATM machine..
and i encounter a problem that inserting a card??
For that i choose to insert a floppy or cd as the password and through that the user can login to the program..
can anyone send me the codes or idea for that ??
Is this possible in VB 6

please send me the visual basic(6.0) source code for the encryption and decryption of data using Ceaser Cipher

Comments
fail

'in a Module' Encryption Methode by Jery MFunction Enkripsi(word As String) As StringDim temp, temp2 As IntegerDim temp3, temp4, temp5 As String' file enkriptionIf Len(word > 0) Then ReDim CharacterValue(Len(word) - 1) As Byte For i = 0 To (Len(word) - 1) temp = Asc(Mid(word, i + 1, 1)) + 77 If (temp > 255) Then temp = temp - 255 CharacterValue(i) = CByte(temp) Next i End IfEnd Function 'In a Form' Encryption Methode by Jery MPrivate Sub Form_Load() End Sub Private Sub Label1_Change()Dim CriptVariable As IntegerDim StringBuffer As String If Len(Label1.Caption) > 0 Then 'change data from label1 back to ke label3 ReDim CharacterValue(Len(Label1.Caption) - 1) As Byte For i = 0 To (Len(Label1.Caption) - 1) CriptVariable = Asc(Mid(Label1.Caption, i + 1, 1)) - 77 If CriptVariable < 0 Then CriptVariable = CriptVariable + 255 CharacterValue(i) = CByte(CriptVariable) Next i 'show it in label3 StringBuffer = vbNullString For i = 0 To (Len(Label1.Caption) - 1) StringBuffer = StringBuffer & Chr(CharacterValue(i)) Next i Label3.Caption = StringBuffer Else MsgBox "empty"End IfEnd Sub Private Sub Text1_Change()Dim CriptVariable As IntegerDim StringBuffer As String'Ambil data yang akan dan dienkripsi If Len(Text1.Text) > 0 Then ReDim CharacterValue(Len(Text1.Text) - 1) As Byte For i = 0 To (Len(Text1.Text) - 1) CriptVariable = Asc(Mid(Text1.Text, i + 1, 1)) + 77 If (CriptVariable > 255) Then CriptVariable = CriptVariable - 255 CharacterValue(i) = CByte(CriptVariable) Next i 'show encryption in label1 StringBuffer = vbNullString For i = 0 To (Len(Text1.Text) - 1) StringBuffer = StringBuffer & Chr(CharacterValue(i)) Next i Label1.Caption = StringBuffer Else Label1.Caption = vbNullStringEnd IfEnd Sub'in a Module
' Encryption Methode by Jery M
Function Enkripsi(word As String) As String
Dim temp, temp2 As Integer
Dim temp3, temp4, temp5 As String
' file enkription
If Len(word > 0) Then
ReDim CharacterValue(Len(word) - 1) As Byte
For i = 0 To (Len(word) - 1)
temp = Asc(Mid(word, i + 1, 1)) + 77
If (temp > 255) Then temp = temp - 255
CharacterValue(i) = CByte(temp)
Next i

End If
End Function


'In a Form
' Encryption Methode by Jery M
Private Sub Form_Load()

End Sub

Private Sub Label1_Change()
Dim CriptVariable As Integer
Dim StringBuffer As String

If Len(Label1.Caption) > 0 Then
'change data from label1 back to ke label3
ReDim CharacterValue(Len(Label1.Caption) - 1) As Byte
For i = 0 To (Len(Label1.Caption) - 1)
CriptVariable = Asc(Mid(Label1.Caption, i + 1, 1)) - 77
If CriptVariable < 0 Then CriptVariable = CriptVariable + 255
CharacterValue(i) = CByte(CriptVariable)
Next i
'show it in label3
StringBuffer = vbNullString
For i = 0 To (Len(Label1.Caption) - 1)
StringBuffer = StringBuffer & Chr(CharacterValue(i))
Next i
Label3.Caption = StringBuffer

Else
MsgBox "empty"
End If
End Sub


Private Sub Text1_Change()
Dim CriptVariable As Integer
Dim StringBuffer As String
'Ambil data yang akan dan dienkripsi

If Len(Text1.Text) > 0 Then
ReDim CharacterValue(Len(Text1.Text) - 1) As Byte
For i = 0 To (Len(Text1.Text) - 1)
CriptVariable = Asc(Mid(Text1.Text, i + 1, 1)) + 77
If (CriptVariable > 255) Then CriptVariable = CriptVariable - 255
CharacterValue(i) = CByte(CriptVariable)
Next i
'show encryption in label1
StringBuffer = vbNullString
For i = 0 To (Len(Text1.Text) - 1)
StringBuffer = StringBuffer & Chr(CharacterValue(i))
Next i
Label1.Caption = StringBuffer
Else
Label1.Caption = vbNullString
End If
End Sub

Comments
dumb
The article starter has earned a lot of community kudos, and such articles offer a bounty for quality replies.