473,770 Members | 6,158 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Encryption method desired...

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
14 2809
MLH <CR**@NorthStat e.net> wrote in
news:72******** *************** *********@4ax.c om:
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
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**@NorthStat e.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
(MyClearTextFi le.txt) and write another file...
c:\WhatEverFil eNameIwant.Desi redExtension
?

Any sample code you'd care to share or porint
out?
xxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxxxxxx

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
On Fri, 28 Oct 2005 15:56:38 -0500, "David W. Fenton"
<dX********@bwa y.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**@NorthStat e.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
Tom van Stiphout <no************ *@cox.net> wrote in
news:kb******** *************** *********@4ax.c om:
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
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(SomeTex t 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(SomeT ext, 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
10438
by: Phil Palmieri | last post by:
Im using md5 to encrypt and decrypt plain text, this works fine... When i try to run the same function on a binary file, it does not decrypt correctly. Is there a way to encrypt binary files correctly, and be able to decrypt them? in the perfect situation i would like to be able to store the encrypted binary file into a mysql blob field, or at least be able to save an encrypted version of the binary file on the server.
14
1954
by: Ray Cassick \(Home\) | last post by:
Ok, time to ask the question here.. I have been battling over this one for sometime now and just have to ask it. I have created a few classes that I use to act a security keys. These classes get serialized using a binary formatter and then symmetrically encrypted. The app will deserialize them and use the contents to judge licensing capabilities, etc. Currently the license key and vectors are stored in the code. I don't like the idea...
9
8188
by: Mike Cronin via DotNetMonster.com | last post by:
Hi there, Can anyone tell me what level of encryption is used when making an HTTPS POST request through an instance of the System.Net.HttpWebRequest object? Thanks much in advance! Mike Cronin Data On Call - Programmer
7
2832
by: helmut woess | last post by:
Hi, has anybody knowledge about the safetyness of encrypting stored procs in SQL-Server 2005 using WITH ENCRYPTION? Or can they be hacked with the same old tools which exists for SQL 2000? thanks, Helmut
113
12353
by: Bonj | last post by:
I was in need of an encryption algorithm to the following requirements: 1) Must be capable of encrypting strings to a byte array, and decyrpting back again to the same string 2) Must have the same algorithm work with strings that may or may not be unicode 3) Number of bytes back must either be <= number of _TCHARs in * sizeof(_TCHAR), or the relation between output size and input size can be calculated simply. Has to take into account the...
7
3870
by: Mark Rae | last post by:
Hi, Picking your collective brains again, this time regarding the storage of the key used in symmetric encryption. Let's say you have a requirement to add encryption to a C# project, so you might choose the TripleDESCryptoServiceProvider class: http://msdn2.microsoft.com/en-us/library/system.security.cryptography.tripledescryptoserviceprovider.aspx No worries - it doesn't present much of a challenge, the MSDN code samples
11
5049
by: John Williams | last post by:
I've written a simple program to do XOR encryption as my first foray into understanding how encryption works. The code compiles fine, however it segmentation faults on every run. using gdb to debug it let me narrow the problem down to the Cipher function I think it faults at line 84 or 85. The program makes it's first read/cipher/write pass without issue but the second pass kills it. Using gdb to print the variables left showed me the...
8
2745
by: manmit.walia | last post by:
Hello Everyone, Long time ago, I posted a small problem I had about converting a VB6 program to C#. Well with the help with everyone I got it converted. But I overlooked something and don't understand why it is doing this. Below is my code, I would be greatfull if someone can guide me through the right path or even help me solve this issue. Problem: The old tool which was written in VB6 works perfect. But I needed to convert this to C#...
19
3302
by: klenwell | last post by:
Another request for comments here. I'd like to accomplish something like the scheme outlined at this page here: http://tinyurl.com/3dtcdr In a nutshell, the form uses javascript to hash (md5) the password field using a random one-time salt (nonce) -- generated by php and pasted in the form -- that is then posted with the hashed password
0
9592
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9425
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10231
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
7416
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6679
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5452
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3972
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3576
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2817
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.