Re: Encrypting variables
From: David Hodgkins (DavidHodgkins_at_discussions.microsoft.com)
Date: 09/30/04
- Next message: Paul fpvt2: "How to send email with attachment using SMTP ?"
- Previous message: Bob O`Bob: "Re: Encrypting variables"
- In reply to: Ralph: "Re: Encrypting variables"
- Next in thread: Bonj: "RE: Encrypting variables"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 30 Sep 2004 09:37:05 -0700
"Ralph" wrote:
>
> "David Hodgkins" <DavidHodgkins@discussions.microsoft.com> wrote in message
> news:935F55C8-DC65-4C19-A701-5F97C6B9B467@microsoft.com...
> > 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?
>
> You didn't mention the Windows plaform you need to support, so the actual
> library or call will vary, but don't bother creating your own encryption
> routines - they are often buggy and never as safe as the authors think they
> are. Use the routines provided by your OS. Or open Google and start
> searching for one of the many freebies out there.
>
> On Win2k checkout the "CryptAPI".
>
> hth
> -ralph
>
>
>
It is a shrink-wrapped program designed to run on anything from Win98 on up.
The encryption routine is not my own, but that is just an example. I am not
worried about the encrypted file. What I am worried about is someone using
something like TextPad to open the exe and seeing "J.o.e.S.m.i.t.h." and the
password in the same way.
- Next message: Paul fpvt2: "How to send email with attachment using SMTP ?"
- Previous message: Bob O`Bob: "Re: Encrypting variables"
- In reply to: Ralph: "Re: Encrypting variables"
- Next in thread: Bonj: "RE: Encrypting variables"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|