diff options
author | Daniel Wilhelm <shieldwed@outlook.com> | 2017-01-08 18:21:23 +0100 |
---|---|---|
committer | Daniel Wilhelm <shieldwed@outlook.com> | 2017-01-08 18:21:23 +0100 |
commit | fe660cdff59aa3a939479ed60172e5c0803552b2 (patch) | |
tree | 045cf295b79de10f75ed6362c5836db25c9fc63a /zen/crc.h | |
parent | 8.6 (diff) | |
download | FreeFileSync-fe660cdff59aa3a939479ed60172e5c0803552b2.tar.gz FreeFileSync-fe660cdff59aa3a939479ed60172e5c0803552b2.tar.bz2 FreeFileSync-fe660cdff59aa3a939479ed60172e5c0803552b2.zip |
8.7
Diffstat (limited to 'zen/crc.h')
-rw-r--r-- | zen/crc.h | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -19,6 +19,19 @@ namespace zen { +uint16_t getCrc16(const std::string& str); +uint32_t getCrc32(const std::string& str); +template <class ByteIterator> uint16_t getCrc16(ByteIterator first, ByteIterator last); +template <class ByteIterator> uint32_t getCrc32(ByteIterator first, ByteIterator last); + + + + +//------------------------- implementation ------------------------------- +inline uint16_t getCrc16(const std::string& str) { return getCrc16(str.begin(), str.end()); } +inline uint32_t getCrc32(const std::string& str) { return getCrc32(str.begin(), str.end()); } + + template <class ByteIterator> inline uint16_t getCrc16(ByteIterator first, ByteIterator last) { |