Encrypting variables

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: David Hodgkins (DavidHodgkins_at_discussions.microsoft.com)
Date: 09/30/04


Date: Thu, 30 Sep 2004 08:19:02 -0700

Hello all,
     I have a program that has to use a hard coded UserID and password to
access an encrypted file. For example:

**********************************************************
Dim strX as string 'UserID
Dim strYas string 'password
Dim strPath as string 'path to the file
Dim secFile as New SecureFile 'class to open encrypted file

strX = "JoeSmith"
strY = "jkdlsw23gh3"
strPath = "C:\Program Files\MyDirectory\MyFile.sec"

secFile.open strPath,strX, strY
**********************************************************

The problem with this is taht if someone were to open the exe with a text
editor, the username and password are visible. My proposed solution is that
instead or typing a literal string is to concatinate together the individual
characters using the Chr() function.

Is this a valid method or is there a better method?



Relevant Pages

  • Re: Encrypting variables
    ... > I have a program that has to use a hard coded UserID and password to ... > Dim strYas string 'password ... > Dim secFile as New SecureFile 'class to open encrypted file ...
    (microsoft.public.vb.general.discussion)
  • Search pattern
    ... Dim strfile As String ... Dim bAddressFound As Boolean ... Dim strCurrentChar As String ...
    (comp.databases.ms-access)
  • Auto Write Name and Merge across
    ... Dim Sheetname01 As String ... Dim WeekName01 As String ...
    (microsoft.public.excel.misc)
  • Re: multiplatform (pocketPC & desktopPC) (Daniel !!)
    ... Friend Versione As String ... Public Sub GetMyConnectionPalmare() ... Dim errorMessages As String ... Private Function GetDS_Desktop(ByVal SQL As String) As DataSet ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: multiplatform (pocketPC & desktopPC) (Daniel !!)
    ... Friend Versione As String ... Public Sub GetMyConnectionPalmare() ... Dim errorMessages As String ... Private Function GetDS_Desktop(ByVal SQL As String) As DataSet ...
    (microsoft.public.dotnet.framework.compactframework)