summaryrefslogtreecommitdiff
path: root/wsutil/crc16.h
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2016-02-06 13:57:56 +0100
committerAnders Broman <a.broman58@gmail.com>2016-02-08 06:01:05 +0000
commit40331511ed9c117703c3097f23e3a2f17b17e993 (patch)
tree8cf742e5d33f1c747f6476698396871c3d2d7bb6 /wsutil/crc16.h
parent0fbc8f80dae3fa7f47d121b25655ac86268681b8 (diff)
downloadwireshark-40331511ed9c117703c3097f23e3a2f17b17e993.tar.gz
add functions to calculate the CRC of an ISO14443-A message
Change-Id: I1ccd9885746a6044f298d7d531a9bc009a70288e Reviewed-on: https://code.wireshark.org/review/13802 Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'wsutil/crc16.h')
-rw-r--r--wsutil/crc16.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/wsutil/crc16.h b/wsutil/crc16.h
index 151b3f210d..11616089cc 100644
--- a/wsutil/crc16.h
+++ b/wsutil/crc16.h
@@ -61,6 +61,12 @@ WS_DLL_PUBLIC guint16 crc16_x25_ccitt_seed(const guint8 *buf, guint len, guint16
@return The CRC16 CCITT checksum (using the given seed). */
WS_DLL_PUBLIC guint16 crc16_ccitt_seed(const guint8 *buf, guint len, guint16 seed);
+/** Compute the 16bit CRC_A value of a buffer as defined in ISO14443-3.
+ @param buf The buffer containing the data.
+ @param len The number of bytes to include in the computation.
+ @return the CRC16 checksum for the buffer */
+WS_DLL_PUBLIC guint16 crc16_iso14443a(const guint8 *buf, guint len);
+
/** Calculates a CRC16 checksum for the given buffer with the polynom
* 0x5935 using a precompiled CRC table
* @param buf a pointer to a buffer of the given length