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

secure hash in c#

RR
Hello I am trying to send an object over the network. However I want to be
able to sign the object. I looked at the sha hash function provided and it
takes in a byte array. I thought of converting the object into a stream
using binary formatter, then converting the stream into a byte array and
feeding it to the sha function. Is there an easier way to do this? For
example just converting directly to a byte array? Thanks for your help

-RR
Nov 15 '05 #1
1 1531
RR <er********@yahoo.com> wrote:
Hello I am trying to send an object over the network. However I want to be
able to sign the object. I looked at the sha hash function provided and it
takes in a byte array. I thought of converting the object into a stream
using binary formatter, then converting the stream into a byte array and
feeding it to the sha function. Is there an easier way to do this? For
example just converting directly to a byte array? Thanks for your help


Well, formatting it to a MemoryStream and then calling
MemoryStream.ToArray will get you the byte array pretty quickly...

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 15 '05 #2

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

Similar topics

14
by: The Plankmeister | last post by:
Hi. I reaslise this is possibly considered off-topic, but I want to pick as many expert brains as possible. Apologies in advance.... I have a form on which I have a username and password box....
3
by: Aaron | last post by:
Hey, I have a question about how secure the following will be.... I want to have a login form that posts to itself, so when it loads it checks if there is a username and password on the query...
14
by: The Plankmeister | last post by:
Hi. I reaslise this is possibly considered off-topic, but I want to pick as many expert brains as possible. Apologies in advance.... I have a form on which I have a username and password box....
20
by: Gef.Mongoose | last post by:
I MD5 encrypt passwords in a user table of my database. I have a global application object (initiated in global.aspx) which contains a few static members (for counting users online etc). because...
2
by: morph276 | last post by:
I am working on a program and need to store sensitive data. I am able to create text files but I need to files to be secure. Do I use the hash class to secure my data and how would this affect new...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
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,...

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.