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
This commit is contained in:
Alex Ames
2015-02-13 15:58:29 -08:00
parent 620fe1c5cf
commit d575321eba
11 changed files with 333 additions and 6 deletions

1
.gitignore vendored
View File

@@ -29,6 +29,7 @@ proguard-project.txt
linklint_results
Makefile
flatc
flathash
flattests
flatsamplebinary
flatsampletext