Simple Encryption and Decryption Function
Simple Encryption and Decryption Function
Rate Simple Encryption and Decryption Function
(1(1 Vote))
'blndec = True:Decrypt, False:Encrypt
Function EncDecryptData(ByVal strval$, ByVal blndec As Boolean) As String
Dim str, str1, str2, str3, str4 As String
Dim int1, int2, int3 As Integer
str1 = strval$
int1 = Len(str1)
int2 = 1
Do While int2 <> (int1 + 1)
str2 = Mid(str1, int2, 1)
If blndec = True Then
int3 = Asc(str2) - 3 'Decrypt
Else
int3 = Asc(str2) + 3 'Encrypt
End If
str3 = Chr(int3)
str4 = str4 & str3
int2 = int2 + 1
Loop
EncDecryptData = str4
End Function
Simple Encryption and Decryption Function Comments
No comments yet — be the first to post one!
Post a Comment