I don't remember exactly what I did and I changed the code to just send the password after that. Besides, we all know how easy it is to defeat an access password anyway, so encrypting the password within the exe is a lame security attempt at best.
Anway, I think I sent the password through this and used the result as the string in the exe. Then I passed it through the decrypt version before putting it in the connection string. This algorithm doesn't use a key and I know it's not very secure. I just didn't want the password in plain sight within the exe.
VB Code:
Public Function EncryptText(sString As String) As String Dim i As Long Dim iLen As Long Dim sDest As String On Error GoTo errHandler sDest = sString iLen = Len(sDest) + 1 For i = 1 To Len(sDest) Mid$(sDest, i, 1) = Chr$((270 + i - Asc(Mid$(sString, iLen - i, 1))) And 255) Next i EncryptText = sDest Exit Function errHandler: LogError Error, Err, vbNullString, "bFunctions.EncryptText" EncryptText = vbNullString End Function




Reply With Quote