From fe660cdff59aa3a939479ed60172e5c0803552b2 Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Sun, 8 Jan 2017 18:21:23 +0100 Subject: 8.7 --- zen/crc.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'zen/crc.h') diff --git a/zen/crc.h b/zen/crc.h index b617bdd0..5c950efc 100644 --- a/zen/crc.h +++ b/zen/crc.h @@ -19,6 +19,19 @@ namespace zen { +uint16_t getCrc16(const std::string& str); +uint32_t getCrc32(const std::string& str); +template uint16_t getCrc16(ByteIterator first, ByteIterator last); +template 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 inline uint16_t getCrc16(ByteIterator first, ByteIterator last) { -- cgit