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@gmail.com, http://libtomcrypt.org
15
int packet_valid_header(unsigned char *src, int section, int subsection)
19
LTC_ARGCHK(src != NULL);
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;
39
/* $Source: /cvs/libtom/libtomcrypt/src/pk/packet_valid_header.c,v $ */
40
/* $Revision: 1.3 $ */
41
/* $Date: 2005/05/05 14:35:59 $ */