mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-23 00:08:52 +00:00
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:
@@ -36,5 +36,13 @@
|
||||
testarrayofstring: [
|
||||
"test1",
|
||||
"test2"
|
||||
]
|
||||
],
|
||||
testhashs32_fnv1: -579221183,
|
||||
testhashu32_fnv1: 3715746113,
|
||||
testhashs64_fnv1: 7930699090847568257,
|
||||
testhashu64_fnv1: 7930699090847568257,
|
||||
testhashs32_fnv1a: -1904106383,
|
||||
testhashu32_fnv1a: 2390860913,
|
||||
testhashs64_fnv1a: 4898026182817603057,
|
||||
testhashu64_fnv1a: 4898026182817603057
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user