By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,490 Members | 1,791 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,490 IT Pros & Developers. It's quick & easy.

Encryption method desired...

P: n/a
MLH
Here's what I would like to do from with VBA procedure
running in Access 97...

Read a plaintext file on disk (IE, autoexec.bat), encrypt
it and write it to disk (say, c:\encryptd.txt). Recommendations
on the SIMPLEST tools possible to accomplish this. Will
be distributing in A97 runtime environment and do NOT
wish to encounter problems on remote target machines
having REFERENCE issues, etc.

Many thx N advance.
Nov 13 '05 #1
Share this Question
Share on Google+
14 Replies


P: n/a
MLH <CR**@NorthState.net> wrote in
news:mp********************************@4ax.com:
Here's what I would like to do from with VBA procedure
running in Access 97...

Read a plaintext file on disk (IE, autoexec.bat), encrypt
it and write it to disk (say, c:\encryptd.txt). Recommendations
on the SIMPLEST tools possible to accomplish this. Will
be distributing in A97 runtime environment and do NOT
wish to encounter problems on remote target machines
having REFERENCE issues, etc.


Do a FIND for "Visual Basic" on this page:

http://userpages.umbc.edu/~mabzug1/cs/md5/md5.html

and see if the options there work. I'd definitely consider just
bundling the MD5 DLL with my runtime app and using its function
directly, assuming the licensing for it allows that.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #2

P: n/a

MLH wrote:
Will be distributing in A97 runtime environment


HMMOGBWUNAITHOON

Nov 13 '05 #3

P: n/a
On Thu, 27 Oct 2005 20:52:54 -0500, "David W. Fenton"
<dX********@bway.net.invalid> wrote:

MD5 computes a message digest, but is not an encryption technique in
itself.

-Tom.

MLH <CR**@NorthState.net> wrote in
news:mp********************************@4ax.com :
Here's what I would like to do from with VBA procedure
running in Access 97...

Read a plaintext file on disk (IE, autoexec.bat), encrypt
it and write it to disk (say, c:\encryptd.txt). Recommendations
on the SIMPLEST tools possible to accomplish this. Will
be distributing in A97 runtime environment and do NOT
wish to encounter problems on remote target machines
having REFERENCE issues, etc.


Do a FIND for "Visual Basic" on this page:

http://userpages.umbc.edu/~mabzug1/cs/md5/md5.html

and see if the options there work. I'd definitely consider just
bundling the MD5 DLL with my runtime app and using its function
directly, assuming the licensing for it allows that.


Nov 13 '05 #4

P: n/a
On Thu, 27 Oct 2005 18:28:11 -0400, MLH <CR**@NorthState.net> wrote:
Here's what I would like to do from with VBA procedure
running in Access 97...

Read a plaintext file on disk (IE, autoexec.bat), encrypt
it and write it to disk (say, c:\encryptd.txt). Recommendations
on the SIMPLEST tools possible to accomplish this. Will
be distributing in A97 runtime environment and do NOT
wish to encounter problems on remote target machines
having REFERENCE issues, etc.

Many thx N advance.


1. Nothing is perfect.
2. simplest is use Winzip.
3. Use a different password for every file.
4. Use a long gibberish password.

Nov 13 '05 #5

P: n/a
MLH
Now there's an idea. Its certainly cheap enough.
Can I launch a password-based WinZip process
from VBA that will run hidden, read some text file
(MyClearTextFile.txt) and write another file...
c:\WhatEverFileNameIwant.DesiredExtension
?

Any sample code you'd care to share or porint
out?
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

1. Nothing is perfect.
2. simplest is use Winzip.
3. Use a different password for every file.
4. Use a long gibberish password.


Nov 13 '05 #6

P: n/a
MLH
Dunno much about MD5 and would like to ask about the point
you made here. What is the difference between a message
digest and an encrypted message? Would a layman, for instance,
not know the difference?

Better still - what would a text file containing "Hi Tom. How are you
today?" with a CRLF appendage look like if a password of "ABCDE"
was used?
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

MD5 computes a message digest, but is not an encryption technique in
itself.

-Tom.

MLH <CR**@NorthState.net> wrote in
news:mp********************************@4ax.co m:
Here's what I would like to do from with VBA procedure
running in Access 97...

Read a plaintext file on disk (IE, autoexec.bat), encrypt
it and write it to disk (say, c:\encryptd.txt). Recommendations
on the SIMPLEST tools possible to accomplish this. Will
be distributing in A97 runtime environment and do NOT
wish to encounter problems on remote target machines
having REFERENCE issues, etc.


Do a FIND for "Visual Basic" on this page:

http://userpages.umbc.edu/~mabzug1/cs/md5/md5.html

and see if the options there work. I'd definitely consider just
bundling the MD5 DLL with my runtime app and using its function
directly, assuming the licensing for it allows that.


Nov 13 '05 #7

P: n/a
On Fri, 28 Oct 2005 09:28:21 -0400, MLH <CR**@NorthState.net> wrote:

A message digest is a short number (in this case 128 bits) that is
unique for this message. But given that digest, you cannot get the
plaintext back.
With an encrypted text, you (presumably) can get the plaintext back.

-Tom.

Dunno much about MD5 and would like to ask about the point
you made here. What is the difference between a message
digest and an encrypted message? Would a layman, for instance,
not know the difference?

Better still - what would a text file containing "Hi Tom. How are you
today?" with a CRLF appendage look like if a password of "ABCDE"
was used?
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

MD5 computes a message digest, but is not an encryption technique in
itself.

-Tom.

MLH <CR**@NorthState.net> wrote in
news:mp********************************@4ax.com :

Here's what I would like to do from with VBA procedure
running in Access 97...

Read a plaintext file on disk (IE, autoexec.bat), encrypt
it and write it to disk (say, c:\encryptd.txt). Recommendations
on the SIMPLEST tools possible to accomplish this. Will
be distributing in A97 runtime environment and do NOT
wish to encounter problems on remote target machines
having REFERENCE issues, etc.

Do a FIND for "Visual Basic" on this page:

http://userpages.umbc.edu/~mabzug1/cs/md5/md5.html

and see if the options there work. I'd definitely consider just
bundling the MD5 DLL with my runtime app and using its function
directly, assuming the licensing for it allows that.


Nov 13 '05 #8

P: n/a
MLH
Gotcha. Thx very much. I like polite person's idea.
Dunno if you looked at it. My security objective is
about as important as locking up shed if you keep
some costly tools in it. That is, I'll spring for a pad-
lock - but I'm not going to buy a used, walk-in bank
vault.

Really, I could write a routine to shuffle and cut the
string a few times - like a deck of cards. Honestly,
if I found example code posted that doessomething
like that - I'd probably just go with it.
Nov 13 '05 #9

P: n/a
Tom van Stiphout <no*************@cox.net> wrote in
news:5v********************************@4ax.com:
MD5 computes a message digest, but is not an encryption technique
in itself.


Excuse me? Google for "MD5 encryption" and you get lots of hits for
articles about encryption.

MD5 encryption is explained here:

http://aspnet.4guysfromrolla.com/articles/103002-1.aspx

under the topic heading "MD5 Encryption - A Brief Summary".

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #10

P: n/a
MLH <CR**@NorthState.net> wrote in
news:72********************************@4ax.com:
Gotcha. . . .
Tom is simply wrong.

See http://aspnet.4guysfromrolla.com/articles/103002-1.aspx under
the topic heading "MD5 Encryption - A Brief Summary" for an
explanation of how MD5 encruption is used.
. . . Thx very much. I like polite person's idea.
Dunno if you looked at it. My security objective is
about as important as locking up shed if you keep
some costly tools in it. That is, I'll spring for a pad-
lock - but I'm not going to buy a used, walk-in bank
vault.
MD5 encyrption is *exactly* what you need.
Really, I could write a routine to shuffle and cut the
string a few times - like a deck of cards. Honestly,
if I found example code posted that doessomething
like that - I'd probably just go with it.


MD5 encryption is exactly what you need.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #11

P: n/a
You can, (I think you need to buy an extra bit from WINZIP)
but then it isn't any easier than using other encryption s/w,
sorry I misread your original request

On Fri, 28 Oct 2005 09:22:35 -0400, MLH <CR**@NorthState.net> wrote:
Now there's an idea. Its certainly cheap enough.
Can I launch a password-based WinZip process
from VBA that will run hidden, read some text file
(MyClearTextFile.txt) and write another file...
c:\WhatEverFileNameIwant.DesiredExtension
?

Any sample code you'd care to share or porint
out?
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

1. Nothing is perfect.
2. simplest is use Winzip.
3. Use a different password for every file.
4. Use a long gibberish password.


Nov 13 '05 #12

P: n/a
On Fri, 28 Oct 2005 15:56:38 -0500, "David W. Fenton"
<dX********@bway.net.invalid> wrote:

The message digest is a 128-bit number. It simply cannot hold all the
information a large plaintext does. It therefore does not encrypt the
plaintext (in the sense that it can be decrypted).

-Tom.

MLH <CR**@NorthState.net> wrote in
news:72********************************@4ax.com :
Gotcha. . . .


Tom is simply wrong.

See http://aspnet.4guysfromrolla.com/articles/103002-1.aspx under
the topic heading "MD5 Encryption - A Brief Summary" for an
explanation of how MD5 encruption is used.
. . . Thx very much. I like polite person's idea.
Dunno if you looked at it. My security objective is
about as important as locking up shed if you keep
some costly tools in it. That is, I'll spring for a pad-
lock - but I'm not going to buy a used, walk-in bank
vault.


MD5 encyrption is *exactly* what you need.
Really, I could write a routine to shuffle and cut the
string a few times - like a deck of cards. Honestly,
if I found example code posted that doessomething
like that - I'd probably just go with it.


MD5 encryption is exactly what you need.


Nov 13 '05 #13

P: n/a
Tom van Stiphout <no*************@cox.net> wrote in
news:kb********************************@4ax.com:
The message digest is a 128-bit number. It simply cannot hold all
the information a large plaintext does. It therefore does not
encrypt the plaintext (in the sense that it can be decrypted).


I don't know where you're getting this bit about message digests.

However, I re-read what MLH wanted, and he needs 2-way encryption,
so it wouldn't work, as MD5 is only 1-way.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #14

P: n/a
MLH wrote:
Gotcha. Thx very much. I like polite person's idea.
Dunno if you looked at it. My security objective is
about as important as locking up shed if you keep
some costly tools in it. That is, I'll spring for a pad-
lock - but I'm not going to buy a used, walk-in bank
vault.

Really, I could write a routine to shuffle and cut the
string a few times - like a deck of cards. Honestly,
if I found example code posted that doessomething
like that - I'd probably just go with it.


A routine to do a "Caesar cipher" is simple to write. This is definitely
not high-end security, but it will keep casual eyes from seeing anything
of value.

This is totally untested and sleazy code, but maybe it will give you
some ideas:

==== Code Begin
Function Encrypt(SomeText As String) As String
' Loop through the input, shifting each character's ASCII value
Dim i As Long
Dim tmp As String
For i = 1 To Len(SomeText)
tmp = tmp + Shift(Mid(SomeText, i, 1))
Next i
Encrypt = tmp
End Function

Function Shift(SomeChar As String) As String
' Shift the input character's ASCII value by 17
' but only if its ASCII value is in [32..126]
Dim n As Integer
n = Asc(SomeChar)
If n >= 32 And n <= 126 Then
n = n + 17
If n > 126 Then n = n - 126 + 32
Shift = Chr(n)
Else
Shift = SomeChar
End If
End Function
==== Code End

? encrypt ("Smartin")
d~r%'z!

The procedure to reverse the "encryption" would be pretty simple to do.
--
Smartin
Nov 13 '05 #15

This discussion thread is closed

Replies have been disabled for this discussion.