473,327 Members | 2,016 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,327 software developers and data experts.

Write data in XML file

HI,
I would like to save some user configuration info on XML
file, but I also need to "hide" the password so that
nobody can read that info. Do i need an ecryption routine
or can I convert the password in some other format?
Thanks,
Fabrizio
Nov 15 '05 #1
3 8167
use System.Security.Cryptography

-------------------------
"Manish Agarwal"- <ma***********@hotmail.com>
http://personal.vsnl.com/mkag
If replying to the group, please do not mail me.
"Fabrizio" <fm******@gestionescorte.it> wrote in message news:0a****************************@phx.gbl...
HI,
I would like to save some user configuration info on XML
file, but I also need to "hide" the password so that
nobody can read that info. Do i need an ecryption routine
or can I convert the password in some other format?
Thanks,
Fabrizio

Nov 15 '05 #2
Fabrizio,

You can use any of the classes that derive from the
System.Security.Cryptography.SymmetricAlgorithm class to encrypt your
string. However, if you store the private key and IV value in the assembly,
you need to be aware that almost anyone could see it using a disassembler.
In this case, you might want an unmanaged assembly of some sort that would
return the key and iv value to you. While this isn't foolproof, it will
deter the majority of people who's threshold is looking in the disassembler.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- ni**************@exisconsulting.com

"Fabrizio" <fm******@gestionescorte.it> wrote in message
news:0a****************************@phx.gbl...
HI,
I would like to save some user configuration info on XML
file, but I also need to "hide" the password so that
nobody can read that info. Do i need an ecryption routine
or can I convert the password in some other format?
Thanks,
Fabrizio

Nov 15 '05 #3
http://rss.com.com/2100-1009_3-5053063.html

Take a look. That's about hashing, Windows crypto etc.

Dmitri.

"Nicholas Paldino [.NET/C# MVP]" <ni**************@exisconsulting.com> wrote
in message news:%2****************@TK2MSFTNGP11.phx.gbl...
Fabrizio,

You can use any of the classes that derive from the
System.Security.Cryptography.SymmetricAlgorithm class to encrypt your
string. However, if you store the private key and IV value in the assembly, you need to be aware that almost anyone could see it using a disassembler.
In this case, you might want an unmanaged assembly of some sort that would
return the key and iv value to you. While this isn't foolproof, it will
deter the majority of people who's threshold is looking in the disassembler.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- ni**************@exisconsulting.com

"Fabrizio" <fm******@gestionescorte.it> wrote in message
news:0a****************************@phx.gbl...
HI,
I would like to save some user configuration info on XML
file, but I also need to "hide" the password so that
nobody can read that info. Do i need an ecryption routine
or can I convert the password in some other format?
Thanks,
Fabrizio


Nov 15 '05 #4

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

Similar topics

1
by: Ellixis | last post by:
Hello, How can I use fwrite() and fseek() in order to write data in the middle (or anywhere else) of a file without overwriting existing data ? People told me that I should load the file into...
7
by: Bob | last post by:
Hi, I am trying to use BULK INSERT with format file. All of our data has few bytes of header in the data file which I would like to skip before doing BULK INSERT. Is it possible to write...
9
by: ALI-R | last post by:
Hi,, I have two questions : 1) Is it mandatory that config file of a desktop application must be App.config 2) Is it possible to update config file in your code?? thanks for your help. ALI
2
by: agphoto | last post by:
There is big or problem in open file in read and write mode.. $file = "data.txt"; $fp = fopen($file,"w+"); $line = fgets($fp,"120"); // i need only 1st line to read and upto 120 bytes echo...
4
by: Billy | last post by:
Hi all, I'm building a text file from a database table using the ASP Write Method and would like to position the cursor in a specific column position before writing the fields. As I loop through...
9
by: andy.z | last post by:
If 2 people try to access the same text file at the same time to write to it - what happens in PHP ? What I mean is - presumably the first will be ok - But what will the second person actually...
6
by: globalrev | last post by:
i ahve a program that takes certain textsnippets out of one file and inserts them into another. problem is it jsut overwrites the first riow every time. i want to insert every new piece of...
1
by: xiao | last post by:
HI~ guys , I have a program here (Sorry it is very long about 240 lines.) It can read and write the header information successfully but it cannot write the array successfully. I guess there is...
1
by: Sachin Garg | last post by:
I have a program which opens a fstream in binary input+output mode, creating the file if it doesn't exists. But writing doesn't works after reading, it must be something obvious that I am not aware...
8
blazedaces
by: blazedaces | last post by:
So I have a program below which writes an excel file with multiple sheets based on inputs of sheet names, data, cell types, etc. It uses Apache POI, which is currently the only thing I found...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.