Encryption of Large Text String

X

xanthviper

I know this has been probably covered a lot, but hopefully someone can
help me out. Awhile back, I was doing some searching on encryption
methods and found an example to where you can take very large amounts
of text and encrypt that down to a very small string. So, basically
you could take the US Constitution and get that down to something like
a 64 character string. My assumption is that there would be a key
invovled. I am looking to basically encrypt a large amount of text, say
1000 charactes, and get it down to about 50 characters, and then with
a decryption method, give me the results. Could anyone point me in a
method that could probably help me out with this? I will can use
either .NET 1.1 or 2.0

Thank you for your help.
 
S

Scott Allen

Like Peter said, you are looking for compression, not encryption. In
2.0 there are compression classes available, but for 1.x you'll need
to find a third party library (try searching the web for SharpZipLib).

What you describe (taking a long document and generating a string of X
characters) is available, but it is known as a hash. A hash is
irreversible, so you can't pass the hash to an algorithm and get the
original document back.
 
X

xanthviper

You know, when I was typing this out last night, it didn't even cross
my mind to think about compression as it is probably the right way to
go, so much for thinking clearly after a long day.

What I am looking to do is to take a .INI file I have for an applicaton
I have created and compress that data down to a nominal size. So in
other words, take the contents of the .INI file and make that ini file
now be:


compresseddatahere.test

There is a good reason as to why I want to do this according to the way
the application works and it's deployment over the web so please bear
with me if it sounds kind of a dumb thing to do. I was looking into
encryption originally since I was thinking that since I really don't
want people nosing around with the data inside of the ini file, that
would have been the best way to go.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top