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

32 bit checksum with VB .Net

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
Nov 20 '05 #1
4 4803
Hello,

"Nitin" <ni****@gmail.com> a écrit dans le message de
news:1f**************************@posting.google.c om...
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
Nov 20 '05 #2
* ni****@gmail.com (Nitin) scripsit:
I want to calculate 32 bit (4 byte) one's complement checksum of a byte array.
Does anyone know of any sample source.


<URL:http://vbaccelerator.com/article.asp?id=930>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #3
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

"Bismark Prods" <tr*******@vtxnet.ch> wrote in message news:<ca**********@newshispeed.ch>...
Hello,

"Nitin" <ni****@gmail.com> a écrit dans le message de
news:1f**************************@posting.google.c om...
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

Nov 20 '05 #4
Hello,

"Nitin" <ni****@gmail.com> a écrit dans le message de
news:1f**************************@posting.google.c om...
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 !

-NP
Bismark

"Bismark Prods" <tr*******@vtxnet.ch> wrote in message

news:<ca**********@newshispeed.ch>...
Hello,

"Nitin" <ni****@gmail.com> a écrit dans le message de
news:1f**************************@posting.google.c om...
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

Nov 20 '05 #5

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

Similar topics

12
by: Mercuro | last post by:
Hello i'm looking for a simple way to checksum my data. The data is 70 bytes long per record, so a 32 byte hex md5sum would increase the size of my mysql db a lot. I'm looking for something...
2
by: pradeep | last post by:
I have 2 data files, DATA1 and DATA2 , both same. My task is to: Open DATA1, compute the checksum and put it in the end of the file(don't bother about boundary conditions).close DATA1 Open...
4
by: Abby | last post by:
I have an array which contain Hex no. in each position. For examples, unsigned char data; data = 0x00; data = 0x01; data = 0x02; data = 0xE; data = 0xEF; --> This is the checksum value
2
by: Abby | last post by:
I need to do 8 bits 2's complement checksum, so I wrote code in order to see if the checksum calculation is correct. ===========================================================================...
6
by: Kevin | last post by:
I'm on Sun 0S 5.8 and need to calculate the checksum of certain sections in an ELF binary file. Specifically .text to .rodata. I'm able to parse through to the program header table and then find...
6
by: Astroman | last post by:
Hi guys and girls. This is my first time posting here so go easy :) . I was wondering if someone could please interpret how this csum() function works in the following C code. I know that the...
3
by: Andrus | last post by:
Device connected to serial port accepts data packets in the form 02 0x57 ll ll 00 00 00 00 dd..dd cc cc 02 (1 byte ) is message prefix 0x57 (1 byte) is message type (W=Write) ll ll ( 2 bytes)...
1
by: Terry | last post by:
I'm trying to calculate the checksum for UDP packet. The algorithm itself is not difficult (lots of examples out there), but what I'm having the most trouble with is determining the byte order...
1
by: gameMaker | last post by:
I need to be able to build my code into a dll where the checksum of the dll is the same everytime I build it. In other words, the same exact code gives me a different checksum each time I build...
4
by: Rain | last post by:
hi, need help here, does anyone know how to use or does any one have the code for checksum? I want to checksum a string to be sent using udp and checksum it again when received.. does anyone...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
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...
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: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
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...
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.