Skip to content
/ crc Public
forked from gityf/crc

QuasarApp addapted crc library. crc16/crc32/crc64

Notifications You must be signed in to change notification settings

QuasarApp/crc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QuasarApp crc library

Support: crc8/crc16/crc32/crc64

Build

git clone https://github.com/gityf/crc.git
mkdir build
cd build
cmake .. -DBUILD_SHARED_LIBS=1 -DCRC_TESTS=1
make 

Testing

./crc_test 
[ RUN      ] ==== Test CRC8Test.BasicTest
[ RUN      ] ==== Test CRC16Test.BasicTest
[ RUN      ] ==== Test CRC32Test.BasicTest
[ RUN      ] ==== Test CRC64Test.BasicTest
[ RUN      ] ==== Test CRC8PolyTest.BasicTest
[ RUN      ] ==== Test CRC16PolyTest.BasicTest
[ RUN      ] ==== Test CRC32PolyTest.BasicTest
[ PASS     ] ==== PASSED 7 tests
[ NOPASS   ] ==== ERROR 0 tests

Include

Cmake build system

add_subdirectory(crc)

target_link_libraries(${PROJECT_NAME} PUBLIC crc)

Usage

#include <crc/crchash.h>

int main() {
    std::string data = "This is data for hash";
    
    auto hash16 = qa_common::hash16(data)
    auto hash32 = qa_common::hash32(data)
    auto hash64 = qa_common::hash64(data)
    
    return 0;
}

Packages

No packages published

Languages

  • C 61.0%
  • C++ 32.5%
  • Makefile 4.0%
  • CMake 2.5%