1
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
3
* LibTomCrypt is a library that provides various cryptographic
4
* algorithms in a highly modular and flexible manner.
6
* The library is free for all purposes without any express
9
* Tom St Denis, tomstdenis@iahu.ca, http://libtomcrypt.org
15
int packet_valid_header(unsigned char *src, int section, int subsection)
22
ver = ((unsigned long)src[0]) | ((unsigned long)src[1] << 8U);
24
return CRYPT_INVALID_PACKET;
27
/* check section and subsection */
28
if (section != (int)src[2] || subsection != (int)src[3]) {
29
return CRYPT_INVALID_PACKET;