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

Encrpt/Decrypt structure in a file

I am looking to encrypt a file with a structure as follows (for storing data
which does FTP connections):

Structure SiteInformation
Public ID As Integer
Public DisplayName As String
Public UserName As String
Public UserPassword As String
Public RemoteDirectory As String
Public Host As String
Public Anonymouse As Boolean
End Structure

The examples I am finding (on the web and DotNet documentation) are for
encrypting strings not structures. Any ideas?

Thanks in advance for any insight/assistance,
Kevin
Nov 21 '05 #1
4 1001
The idea is to convert the structure to a byte array and then encrypt the
byte array.
http://thedotnet.com/howto/work244483.aspx
http://groups.google.com/groups?selm...%40tkmsftngp05

hope that helps..
Imran.

"ke*************@state.or.us" <Ke***************@state.or.us> wrote in
message news:ug****************@tk2msftngp13.phx.gbl...
I am looking to encrypt a file with a structure as follows (for storing data which does FTP connections):

Structure SiteInformation
Public ID As Integer
Public DisplayName As String
Public UserName As String
Public UserPassword As String
Public RemoteDirectory As String
Public Host As String
Public Anonymouse As Boolean
End Structure

The examples I am finding (on the web and DotNet documentation) are for
encrypting strings not structures. Any ideas?

Thanks in advance for any insight/assistance,
Kevin

Nov 21 '05 #2
Thanks for the links Imran, I will persue this idea!
Kevin

"Imran Koradia" <no****@microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
The idea is to convert the structure to a byte array and then encrypt the
byte array.
http://thedotnet.com/howto/work244483.aspx
http://groups.google.com/groups?selm...%40tkmsftngp05

hope that helps..
Imran.

"ke*************@state.or.us" <Ke***************@state.or.us> wrote in
message news:ug****************@tk2msftngp13.phx.gbl...
I am looking to encrypt a file with a structure as follows (for storing

data
which does FTP connections):

Structure SiteInformation
Public ID As Integer
Public DisplayName As String
Public UserName As String
Public UserPassword As String
Public RemoteDirectory As String
Public Host As String
Public Anonymouse As Boolean
End Structure

The examples I am finding (on the web and DotNet documentation) are for
encrypting strings not structures. Any ideas?

Thanks in advance for any insight/assistance,
Kevin


Nov 21 '05 #3
The first link lead me to
http://www.dotnetinterop.com/faq/?q=StructToByteArray which is an excellent
starting point!

"Imran Koradia" <no****@microsoft.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
The idea is to convert the structure to a byte array and then encrypt the
byte array.
http://thedotnet.com/howto/work244483.aspx
http://groups.google.com/groups?selm...%40tkmsftngp05

hope that helps..
Imran.

"ke*************@state.or.us" <Ke***************@state.or.us> wrote in
message news:ug****************@tk2msftngp13.phx.gbl...
I am looking to encrypt a file with a structure as follows (for storing

data
which does FTP connections):

Structure SiteInformation
Public ID As Integer
Public DisplayName As String
Public UserName As String
Public UserPassword As String
Public RemoteDirectory As String
Public Host As String
Public Anonymouse As Boolean
End Structure

The examples I am finding (on the web and DotNet documentation) are for
encrypting strings not structures. Any ideas?

Thanks in advance for any insight/assistance,
Kevin


Nov 21 '05 #4
"ke*************@state.or.us" <Ke***************@state.or.us> wrote in
message news:uz**************@TK2MSFTNGP12.phx.gbl...
The first link lead me to
http://www.dotnetinterop.com/faq/?q=StructToByteArray which is an excellent starting point!


good luck!

Imran.

Nov 21 '05 #5

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

Similar topics

8
by: Gidi | last post by:
Hi, Is there Buid-In fuction in C# that Encrypt and Decrypt strings? i have a textbox which i'm writing into file, and i want to encrypt it before writing, i'm not looking for something fancy,...
7
by: Dica | last post by:
i've used the sample code from msdn to create an encyption/decryption assembly as found here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetHT10.asp i'm...
3
by: v.Seydewitz | last post by:
Hello NG, How can I decrypt an des ede3 encrypted string with .NET? The string was encrypted by using the OpenSSL Method des-ede3-cbc. Thank You! Joachim
7
by: Jean Christophe Avard | last post by:
Hi! I am designing an application wich comes with image file. These images are copyrighted and they have to be accessible only from within the application. At first, I tought I was going to store...
4
by: DazedAndConfused | last post by:
I encryted a serialized binary formatted object. Now I can't figure out how to deserialize it so that I can decrypt it. I used this code encrypt and write it out: Dim fe As New...
1
by: sweety | last post by:
Dear All, I need to encrypt a C data file(Filled structure data and int, enums). and make a bin file. The at anypoint of time i've to read this .bin file and have to decrypt and have to read the...
0
by: Ganesh Muthuvelu | last post by:
Hello, I need to decrypt a file that has been encrypted using TDES algoirhtm and ECB mode. I have the "key" string to decrypt the file but I could not decrypt it. Can some one help me with a piece...
0
by: dba123 | last post by:
am getting the following error when a sub domain is receiving a shared cookie: I have this in both web.config of each application. The 1.1 application does not have the decryption= value...
3
by: JDeats | last post by:
I have some .NET 1.1 code that utilizes this technique for encrypting and decrypting a file. http://support.microsoft.com/kb/307010 In .NET 2.0 this approach is not fully supported (a .NET 2.0...
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
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...
0
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
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...

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.