473,383 Members | 1,978 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,383 software developers and data experts.

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 1663
* "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
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
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
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
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
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
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
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
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
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
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.