473,509 Members | 7,333 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Encrypting entire file

Hi everyone,

How can one encrypt an entire file? What I mean is not simply encrypting
the content of the file, but also the file's property(e.g. file creation
date, file's name, access right, etc), so the input is a file, say
abc.txt, after encryption and then decryption, the user can get the
whole abc.txt file instead of just the content of the file.

Thanks a lot!

KC Eric
Jun 12 '06 #1
4 1877

"KC Eric" <kc@nospam.com> wrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Hi everyone,

How can one encrypt an entire file? What I mean is not simply encrypting
the content of the file, but also the file's property(e.g. file creation
date, file's name, access right, etc), so the input is a file, say
abc.txt, after encryption and then decryption, the user can get the
whole abc.txt file instead of just the content of the file.

Thanks a lot!

KC Eric


Sounds like you want some sort of file compression utility (Zip, Tar-Ball,
et cetera) and use their encryption techniques :)
HTH,
Mythran

Jun 12 '06 #2
HI,

You cannot, the file's property are kept by the OS.
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"KC Eric" <kc@nospam.com> wrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Hi everyone,

How can one encrypt an entire file? What I mean is not simply encrypting
the content of the file, but also the file's property(e.g. file creation
date, file's name, access right, etc), so the input is a file, say
abc.txt, after encryption and then decryption, the user can get the
whole abc.txt file instead of just the content of the file.

Thanks a lot!

KC Eric

Jun 12 '06 #3
Put it inside another file (zip file?) and encrypt that.

--
Saad Rehmani / Prodika / Dallas / TX / USA
Hi everyone,

How can one encrypt an entire file? What I mean is not simply
encrypting the content of the file, but also the file's property(e.g.
file creation date, file's name, access right, etc), so the input is a
file, say abc.txt, after encryption and then decryption, the user can
get the whole abc.txt file instead of just the content of the file.

Thanks a lot!

KC Eric

Jun 12 '06 #4
Ken

KC Eric wrote:
Hi everyone,

How can one encrypt an entire file? What I mean is not simply encrypting
the content of the file, but also the file's property(e.g. file creation
date, file's name, access right, etc), so the input is a file, say
abc.txt, after encryption and then decryption, the user can get the
whole abc.txt file instead of just the content of the file.

Thanks a lot!

KC Eric

KC,
I like the ZIP suggestions others wrote about, but if you can't or
don't want to use ZIP, you could grab the input file's information from
the FileInfo class, encrypt that, place it at the beginning of your
encrypted file, then encrypt the contents of the file, placing that
behind the encrypted file info.

On decrypt, read the encrypted file info first, create the output file
(decrypted) with that info, then decrypt the file's contents into the
file.

I've done it in Delphi before but not c#, even though it looks to be
just as easy.

Ken - KC7RAD
www.aninetworks.com

Jun 12 '06 #5

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

Similar topics

3
9821
by: Piotr | last post by:
MS has published on its sites javascript encoder, which enables "encrypting" javascript code. It allows hiding js code from being seen as a text file. There is a decoder for it, available in the...
6
2068
by: Dayne | last post by:
Guys, I am writing a database application(vb.net , sql server) and is presently storing the connection settings in a xml file...not very secure though. What is a safer method in a dynamic...
9
1828
by: Brian P. Hammer | last post by:
All - I have an app that saves data to a xml file via a dataset. Our company stores some data in various xml files that is now considered a risk under its security policy. What's the best way to...
7
1330
by: Bob Hollness | last post by:
OK, this has me pulling my hair out. All I want to do is encrypt/decrypt strings. They may be up to 400 characters in length though. So, I assume System.Security.Cryptography is the one to use....
1
1487
by: girthyvhf | last post by:
Hello all, I am trying to use the example for encrypting connection strings called: How To: Build And Run the Protected Configuration Provider Example. This is located in VS 2005 help at: ...
5
2461
by: Chris Dunaway | last post by:
I have an application which is installed on a network share to be run from one or more workstations. I have granted trust to the applications on the workstations and the appropriate permissions on...
3
2871
by: dfa_geko | last post by:
Hi All, I had a question about encrypting and decrypting XML files using asymmetric keys. I copied some sample code from MSDN, here are the samples: ...
4
2309
by: per9000 | last post by:
Hi python people, I am trying to figure out the best way to encrypt files in python. I've build a small script (see below) that encrypts the ubuntu 7.04 iso file in 2 minutes (I like python :)...
2
3120
by: euqaj | last post by:
I want to check or enable the file attribute "Encrypting contents to secure data" only using a scripting such as Batch file. Is it Possible? please i need this asap.. thanks
0
7137
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...
0
7347
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,...
0
7416
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7073
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7506
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5656
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3218
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3207
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1571
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 ...

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.