got it figured out..
 
missed    InttoHex(  value )
 
then i get what I needed.
 
  Thanks though :)
 
    Perry

  _____  

From: [email protected] [mailto:[email protected]] On Behalf
Of Kevin McCoy
Sent: Thursday, August 06, 2009 11:20 AM
To: [email protected]
Subject: [delphi-en] Re: Get CRC32 from Longint


  

--- In delphi...@yahoogrou <mailto:delphi-en%40yahoogroups.com> ps.com,
"Perry Kappetein" <pkappet...@...> wrote:
>
> Is it possible to get a CRC32 from a Longint?
> 
> Can't figure out how.
> 
> anyone knows more?
> 

I think you meant *calculate* a CRC from a longint.

Don't forget that you need to "seed" the CRC generator with a starting
value. Usually the seed is either 0 (zero) or -1, but you can use any value
you like if you don't have to match some other algorithm.

Next, you usually don't calculate a CRC on a single integer or longint. You
usually loop through a block of integer values and calculate a Cyclic
Redundancy Checksum (CRC) on the entire block.

There are many places to find CRC algorithms. One is the old TurboPower
libraries - I think Async Professional had some CRC utilities that I used to
use. A more up to date library of CRC routines can be found at:

http://www.utilmind <http://www.utilmind.com/> .com/

Click on the "Delphi and BCB Components" link at the upper-left part of the
page and then select the "1-10" link. Item #5 is the one you want - the CRC
calculator.

The specific function you want is UpdateCRC32 found in the CRC.PAS file.

Hope this helps

Kevin G. McCoy






[Non-text portions of this message have been removed]

Reply via email to