diff options
author | Lars Schmertmann <Lars.Schmertmann@governikus.de> | 2016-12-18 21:15:10 +0100 |
---|---|---|
committer | Lars Schmertmann <lars.schmertmann@governikus.de> | 2016-12-25 08:24:18 +0000 |
commit | 5882866768ae24ef31f9feda4765fea17375fbcb (patch) | |
tree | 4cf9c7b57e25d7969aac27c45126d8bde7908714 /src/corelib/tools/qbytearray.h | |
parent | 615027129d3d5e12a6e2f5d02d2af8320cc58ea7 (diff) |
Extend qChecksum calculation
ISO 14443-3 is for nfc communication and uses 2 different checksums.
The existing one is from ISO 3309 and the other one is from ITU-V.41.
Both are needed to implement an own transport layer defined in ISO
14443-4 to allow nfc commands with a length above 250 byte independent
from the smartphone.
This change will avoid code duplication in QNearFieldTarget.
The private function qNfcChecksum is a copy of qChecksum.
Change-Id: I790ffec8e2ea46f88b2db6f48b64fdcb140e7b70
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qbytearray.h')
-rw-r--r-- | src/corelib/tools/qbytearray.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/tools/qbytearray.h b/src/corelib/tools/qbytearray.h index cb94b30c2d..af85d27868 100644 --- a/src/corelib/tools/qbytearray.h +++ b/src/corelib/tools/qbytearray.h @@ -105,8 +105,8 @@ Q_CORE_EXPORT int qvsnprintf(char *str, size_t n, const char *fmt, va_list ap); Q_CORE_EXPORT int qsnprintf(char *str, size_t n, const char *fmt, ...); // qChecksum: Internet checksum - -Q_CORE_EXPORT quint16 qChecksum(const char *s, uint len); +Q_CORE_EXPORT quint16 qChecksum(const char *s, uint len); // ### Qt 6: Remove +Q_CORE_EXPORT quint16 qChecksum(const char *s, uint len, Qt::ChecksumType standard); // ### Qt 6: Use Qt::ChecksumType standard = Qt::ChecksumIso3309 class QByteRef; class QString; |