EasyManuals Logo

Gemalto Prox–DU Reference Manual

Gemalto Prox–DU
145 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #38 background imageLoading...
Page #38 background image
Reference Manual
Prox–DU & Prox–SU
www.gemalto.com
DOC118569D Public Use Page 38/145
* (last byte on input must be the supposed CRC of the preceding bytes)
Globals :
Ressources
(Use) :
(Modify):
(Call) Internals :
Externals :
*Remarks :
*****************************************************************************/
unsigned char ucMadCrc( unsigned char _uc_len,
unsigned char *_puc_in,
unsigned char *_puc_out )
{
unsigned char u_i;
unsigned char u_j;
unsigned char uc_status;
uc_status = ERR_OK;
*_puc_out = 0xC7; // bit-swapped 0xE3
for (u_j = 0; u_j < _uc_len; u_j++)
{
*_puc_out = *_puc_out ^ _puc_in[u_j];
for (u_i = 0; u_i < 8; u_i++)
{
if (*_puc_out & 0x80)
{
*_puc_out = (*_puc_out << 1) ^ 0x1D;
}
else
{
*_puc_out = *_puc_out << 1;
}
}
}
if (*_puc_out)
{
uc_status = ERR_MAD_CRC;
}
return (uc_status); // 0x00 if last byte is the CRC of the previous bytes
}

Table of Contents

Other manuals for Gemalto Prox–DU

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Gemalto Prox–DU and is the answer not in the manual?

Gemalto Prox–DU Specifications

General IconGeneral
BrandGemalto
ModelProx–DU
CategoryCard Reader
LanguageEnglish

Related product manuals