Root > Reference > All Functions > CRC16Hash

Function CRC16Hash

Previous pageReturn to chapter overviewNext page   

Calculates CRC-16 checksum.

 

Unit

EHash

 

Syntax

 

Code (Delphi)

function CRC16Hash(

const AData: Pointer;

const ADataSize: Cardinal

): TCRC16Hash; overload;

 

function CRC16Hash(

const AData: RawByteString

): TCRC16Hash; overload;

 

Parameters

AData [in]

A data to calculate checksum.

 

ADataSize [in]

Size of AData in bytes.

 

Return value

CRC-16 checksum of the specified AData.

 

Remarks

A cyclic redundancy check (CRC) is an error-detecting code commonly used in digital networks and storage devices to detect accidental changes to raw data. CRCs are based on the theory of cyclic error-correcting codes. CRCs are popular because they are simple to implement in binary hardware, easy to analyze mathematically, and particularly good at detecting common errors caused by noise in transmission channels.

 

Important!

Unlike cryptographic hash functions (like MD5 or SHA1), CRC is an easily reversible function, which makes it unsuitable for use in digital signatures.

 

Numerous varieties of cyclic redundancy checks have been incorporated into technical standards. CRC16Hash function uses CRC-16-CCITT algorithm. Polynomial is $1021. Starting value is $FFFF.

 

Note

This routine is used to calculate BugID from string source.

 

See also




Send feedback... Build date: 2018-11-26
Last edited: 2018-11-26
PRIVACY STATEMENT
The documentation team uses the feedback submitted to improve the EurekaLog documentation. We do not use your e-mail address for any other purpose. We will remove your e-mail address from our system after the issue you are reporting has been resolved. While we are working to resolve this issue, we may send you an e-mail message to request more information about your feedback. After the issues have been addressed, we may send you an email message to let you know that your feedback has been addressed.


Permanent link to this article: https://www.eurekalog.com/help/eurekalog/topic_function_ehash_crc16hash.php