32 bit checksum with VB .Net

  • Thread starter Thread starter Nitin
  • Start date Start date
N

Nitin

Hi,
I want to calculate 32 bit (4 byte) one's complement checksum of a byte array.
Does anyone know of any sample source.

Please help!

Thanks
NP
 
Hello,

Nitin said:
Hi,
I want to calculate 32 bit (4 byte) one's complement checksum of a byte array.
Does anyone know of any sample source.

Sample source code no, but i know you could use 'BitConverter' too do what
you want.
Please help!

Thanks
NP

Have a nice day

Bismark
 
Hi Bismark,
Thanks for your reply.
I am using the 'BitConvertor'.
The shift operator does not work with UINT32/64 data types. I am also
struggling with overflow problem.

If you find any similar example do let me know.

-NP
 
Hello,

Nitin said:
Hi Bismark,
Thanks for your reply.
I am using the 'BitConvertor'.
The shift operator does not work with UINT32/64 data types. I am also

Because UINTs are not primitive ! UINT32 = INT64 and UINT64 = SINGLE ... in
VB.Net in fact. Do you use C# ?
struggling with overflow problem.

If you know you'll have overflow, you could anticipate it by making methods
shifting your values and verify the overflow to prevent it.
If you find any similar example do let me know.

Before tell me in what language do you code !
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top