473,503 Members | 4,461 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Encrypting filename with file

Hello,

I want to encrypt a file with its filename.
I can encrypt the file itself using the frame libraries.

How can I now best hide the filename and extension?
Within the file, ... ?

I must be able to retrieve the filename after decrypting.
The original files have random filenames and extensions.

example:

original file: username.sec
encrypted file with orig filename: username.sec
encrypted file with encrypted filename: mydate.dat

After encryption I must have username.sec again.

TIA
Nov 20 '05 #1
3 1671
* "dick" <di**@nospam.com> scripsit:
I want to encrypt a file with its filename.
I can encrypt the file itself using the frame libraries.

How can I now best hide the filename and extension?
Within the file, ... ?

I must be able to retrieve the filename after decrypting.
The original files have random filenames and extensions.

example:

original file: username.sec
encrypted file with orig filename: username.sec
encrypted file with encrypted filename: mydate.dat

After encryption I must have username.sec again.


This would make encryption useless. The key used for
encrtyption/decryption is the most important part and storing it in a
format that can be easily read doesn't make much sense.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #2
Hello,

I don't mean storing the key, but the actual filename.

When the file is named "user.jpg", I want it saved as Enc1.dat or something
like that.
Later I must be able to retrieve the original filename from the encrypted
file, for restoring to the original file.

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:2j*************@uni-berlin.de...
* "dick" <di**@nospam.com> scripsit:
I want to encrypt a file with its filename.
I can encrypt the file itself using the frame libraries.

How can I now best hide the filename and extension?
Within the file, ... ?

I must be able to retrieve the filename after decrypting.
The original files have random filenames and extensions.

example:

original file: username.sec
encrypted file with orig filename: username.sec
encrypted file with encrypted filename: mydate.dat

After encryption I must have username.sec again.


This would make encryption useless. The key used for
encrtyption/decryption is the most important part and storing it in a
format that can be easily read doesn't make much sense.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 20 '05 #3
* "dick" <di**@nospam.com> scripsit:
I don't mean storing the key, but the actual filename.


OK, I misread your question, I thought you are using the filename as
encryption key. You can, for example, add sort of "header" to your file
that contains the file name. A very simple approach would be to store
the filename followed by a certain sequence of characters at the
beginning of the file. Then you will have to extract this data and pass
the rest of the file to your decryption routine.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #4

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

Similar topics

2
1782
by: Paul Rogers | last post by:
Hi, im wanting to outpout a binary file from ASP, but encrypt it on the fly according to a given seed (retrieved according to the users login). But ive fallen at the first hurdle, and cant even...
3
9819
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
2066
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...
0
252
by: dick | last post by:
Hello, I want to encrypt a file with its filename. I can encrypt the file itself using the frame libraries. How can I now best hide the filename and extension? Within the file, ... ? I...
4
1872
by: KC Eric | last post by:
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,...
5
2459
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...
2
1193
by: Brian Huether | last post by:
I have a function that serves audio as a stream. I don't want people to see the filename. But I am using urls of this sort: audio.php?op=serveaudio&file=www.somefile.mp3 1) How can I encrypt...
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
2307
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 :)...
0
7188
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
7258
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
7313
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
6970
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
7441
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
5558
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,...
1
4987
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...
0
3156
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
366
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...

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.