Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Program Announcements / Coming Soon : CRC32

Author
Message
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 2nd Aug 2003 18:56 Edited at: 2nd Aug 2003 18:58
This calculates a CRC-32 value from either a given file or from memory. This was mainly done has a half-way house for the security for the URLDownload (the idea being you calculate the CRC-32 value for all files to check that they are correct).

Its quite fast too - checking a 19Mb file takes around 4 seconds on a 2Ghz machine.


Logo design by Indi
Its better than a poke in the eye...
UberTuba
21
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Brittania
Posted: 2nd Aug 2003 21:35
and the englsh translation is:

the artist formally known as darkfluff
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 2nd Aug 2003 22:54
It calculates a large number.


Logo design by Indi
Its better than a poke in the eye...
Shock
AGK Developer
21
Years of Service
User Offline
Joined: 24th Oct 2002
Location: United Kingdom
Posted: 3rd Aug 2003 01:12
lol, sounds fun

Sticking feathers up your butt doesn't make you a chicken.
Rob K
Retired Moderator
21
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 3rd Aug 2003 01:39
Explanation of CRC32 for those that don't know:

CRC is a special number which can be calculated based on the contents of any file. If you change just one byte in the file, the CRC number will completely change. Thus this number is useful with ZIP files for example, to check that files contained in the ZIP file have not been corrupted (check that the CRC written in the file = the CRC of the file extracted)

It is also used in copy protection to check whether or not a file has been tampered with.

@Toady

Tsk. tsk - Not bad speed - still room for improvement though

MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 3rd Aug 2003 03:53 Edited at: 3rd Aug 2003 03:56
Yes, got it down to two seconds - should have it around to less than 1 shortly (using a 1Mb file buffer).


Logo design by Indi
Its better than a poke in the eye...
MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 3rd Aug 2003 04:07 Edited at: 3rd Aug 2003 04:12
Good description of CRC by the way, although mine was shorter...

I think I know what was causing the WAIT KEY problem earlier - as I was using the DBPro window handle in a MFC program, to display a message box, MFC seems to block the first keypress afterwards. No idea why though, because by the time the DBPro continues, the message box has gone.


Logo design by Indi
Its better than a poke in the eye...
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 3rd Aug 2003 06:35
Critial Repair Code? ... something like that
would go well with that updater plugin, that downloads files bit-by-bit right?

MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 3rd Aug 2003 12:59 Edited at: 3rd Aug 2003 13:00
Thats it mainly for - after downloading, you check to see if all the files are correct.

Its actually Cyclic Redundency Check.


Logo design by Indi
Its better than a poke in the eye...
Hell IVIonkey
21
Years of Service
User Offline
Joined: 1st Apr 2003
Location: Outer Limits
Posted: 3rd Aug 2003 13:53
I've been wanting CRC support for ages, especially since I need extra security if I release my game commercially. I look forward to it!

MrTAToad
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 3rd Aug 2003 14:12 Edited at: 3rd Aug 2003 14:23
Well, the good news is its availiable for testing now.
If I remember correctly, your using DBC ? If so, you'll need DarkMatter to call DLL's.

The two functions are :

?calcCRC32FromMemory@@YAKKK@Z - Calculate CRC from memory
?calcCRC32@@YAKPAD@Z - Calculate CRC from file


Logo design by Indi
Its better than a poke in the eye...
David T
Retired Moderator
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 21st Aug 2003 12:58
This soudns really good. I'll be looking for this as soon as it's released.

Is the number generated a normal decimal number (123456) or is it hex?

How long are the numbers?

You are the th person to view this signature.
GRAVITY: I fought the law but the law won
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 21st Aug 2003 13:39
Its been released for a while - generally when I say its coming soon in here, its ready but I haven't updated my web site (or its updating whilst I'm writing the message).

Its different from a coming soon message in the announcements, where generally I've finished it, but needs testing.

Its a normal 32-bit unsigned integer - I generally display it in hex, but its up to you.

Login to post a reply

Server time is: 2024-04-19 17:39:41
Your offset time is: 2024-04-19 17:39:41