473,387 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Encryption of Large Text String

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.

Nov 19 '05 #1
3 1611
Are you sure you aren't talking about compression?

<xa********@xanthviper.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
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.

Nov 19 '05 #2
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.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On 4 Oct 2005 22:51:41 -0700, xa********@xanthviper.com wrote:
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.


Nov 19 '05 #3
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.

Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

34
by: Blake T. Garretson | last post by:
I want to save some sensitive data (passwords, PIN numbers, etc.) to disk in a secure manner in one of my programs. What is the easiest/best way to accomplish strong file encryption in Python? ...
5
by: c duden | last post by:
I am attempting to encrypt some text and be able to decrypt it at a later time. I have two methods to do this: public static Byte EncryptText(string textToEncrypt, string encryptionHash) {...
113
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...
7
by: Alan Silver | last post by:
Hello, I am writing a page where sensitive data is collected (over SSL) and stored in a database. I have been looking at the .NET encryption classes, but am a bit confused as to which is best...
1
by: Danny van Kasteel | last post by:
Hi, I've been reading the thread, and one thing that struck me as odd was that you are trying to mimic an immensely difficult and sensitive procedure by re-inventing the wheel... First of...
6
by: larry mckay | last post by:
Hi, Does anyone have any simple text string encryption routines that are easy to implement? I'm trying to prevent users and system administrators from figuring out how I implement things....
3
by: Anon | last post by:
I made this class to encrypt my DataSet before saving it to disk. So, first in the main program I write the DataSet to XML in a MemoryStream. I pass this stream to the E_File sub, which encrypts...
8
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...
22
by: Wilson | last post by:
i am learning to program using c++ and was set a task of making a simple encryption algorithim. I choose to start with one where simply each letter is replaced with its equivilent in the alphabet...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...

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.