Added the hash attribute to ints and longs.
FlatBuffer schema files can now optionally specify a hash attribute that will allow someone writing json files to enter a string to be hashed rather than a specific value. The hashing algorithm to use is specified by the schema. Currently the only algorithms are fnv1 and fnv1a. There are 32 bit and 64 variatns for each. Additionally, a hashing command line tool was added so that you can see what a string will hash to without needing to inspect the flatbuffer binary blob. Change-Id: I0cb359d0e2dc7d2dc1874b446dc19a17cc77109d
Showing
- .gitignore 1 addition, 0 deletions.gitignore
- CMakeLists.txt 14 additions, 1 deletionCMakeLists.txt
- include/flatbuffers/hash.h 105 additions, 0 deletionsinclude/flatbuffers/hash.h
- include/flatbuffers/idl.h 3 additions, 0 deletionsinclude/flatbuffers/idl.h
- src/flathash.cpp 102 additions, 0 deletionssrc/flathash.cpp
- src/idl_parser.cpp 60 additions, 1 deletionsrc/idl_parser.cpp
- tests/monster_test.fbs 8 additions, 0 deletionstests/monster_test.fbs
- tests/monster_test_generated.h 22 additions, 2 deletionstests/monster_test_generated.h
- tests/monsterdata_test.golden 9 additions, 1 deletiontests/monsterdata_test.golden
- tests/monsterdata_test.json 9 additions, 1 deletiontests/monsterdata_test.json
- tests/monsterdata_test.mon 0 additions, 0 deletionstests/monsterdata_test.mon
Loading
Please register or sign in to comment