Hi there,
I wonder which version of xxHash is used in FFAStrans. Is it 32 or 64 Bit? Has it an "Initial Number"?
I ask because a MAM-System wants to check our Hashes. The people at the MAM asked us, which version and Initial Number...
Thanks in advance,
tom
Which version of xxHash is used in FFAStrans?
Re: Which version of xxHash is used in FFAStrans?
Hi Thomas,
I belive it's 0.6.2, using 32 bit version for consistency across 32/64 bit installations of FFAStrans.
"Initial Number"? I'm not quite sure what you mean by that but maybe it's 0.6.x
-steinar
I belive it's 0.6.2, using 32 bit version for consistency across 32/64 bit installations of FFAStrans.
"Initial Number"? I'm not quite sure what you mean by that but maybe it's 0.6.x
-steinar
Re: Which version of xxHash is used in FFAStrans?
Hey Steinar,
thanks for the reply. The question is, if there is an "initial value" which is a given start-value for calculating the hashes?
kind regards,
tom
thanks for the reply. The question is, if there is an "initial value" which is a given start-value for calculating the hashes?
kind regards,
tom
Re: Which version of xxHash is used in FFAStrans?
Hey Thomas,
you can tell your guys they can read the source code of interest here:
https://github.com/Cyan4973/xxHash/blob/dev/xxhsum.c
FFastrans calls this commandline tool with only the filename to hash as a parameter, no other parameters.
As far as i understand from the code (whithout understanding it too much), the "initial value" that you are after is set to "0". As seen in line 263 of the above xxhsum.c file:
You can play with the hashing commandline tool yourself, it is located here in your ffastrans folder:
Processors\resources\xxhsumX64.exe
example usage:
Which actually also means that when running on 32bit OS, the xxhash function might not work at all because the xxhsumX86.exe does not understand the parameter "-H0" and fails to create the checksum. One thing i did not understand at all is that xxhsumX86.exe seems to be a totally different tool than the x64 one, it accepts totally different parameters and spits out a totally different outputt (pipe separated instead of "hash space filename")
If my findings are correct this means the answer for @ThomasM is:
-) on 64bit OS, $xxhash will use the 64bit algorithm
-) the "initial value" is 0
you can tell your guys they can read the source code of interest here:
https://github.com/Cyan4973/xxHash/blob/dev/xxhsum.c
FFastrans calls this commandline tool with only the filename to hash as a parameter, no other parameters.
As far as i understand from the code (whithout understanding it too much), the "initial value" that you are after is set to "0". As seen in line 263 of the above xxhsum.c file:
Code: Select all
#define XXHSUM64_DEFAULT_SEED 0 /* Default seed for algo_xxh64 */
Processors\resources\xxhsumX64.exe
example usage:
By the way, @steinar: i recognized that actually it uses the 64bit algorithm in this case:xxhsumX64.exe c:\temp\filename.mxf
Code: Select all
If @OSArch = 'X64' Then $s_hash = ''
If my findings are correct this means the answer for @ThomasM is:
-) on 64bit OS, $xxhash will use the 64bit algorithm
-) the "initial value" is 0
emcodem, wrapping since 2009 you got the rhyme?
Re: Which version of xxHash is used in FFAStrans?
Hey emcodem,
Thank you so much for clearing this up. Very interesting the opportunities to have a deep look inside OpenSource software. Even better to have someone who has an understanding of it all
regards,
tom
Thank you so much for clearing this up. Very interesting the opportunities to have a deep look inside OpenSource software. Even better to have someone who has an understanding of it all
regards,
tom
Re: Which version of xxHash is used in FFAStrans?
Hello guys, sorry for late response.
The xxhash implementation was supposed to be consistant between os architectures but obviously there's a bug here. Also, I found that the x86 hash output version would not be read correctly. So, the xxhash did probably NOT work on 32bit OS and gave as you pointed out 64bit hash on 64 bit.
Thanks for notifying!
-steinar
The xxhash implementation was supposed to be consistant between os architectures but obviously there's a bug here. Also, I found that the x86 hash output version would not be read correctly. So, the xxhash did probably NOT work on 32bit OS and gave as you pointed out 64bit hash on 64 bit.
Thanks for notifying!
-steinar
Re: Which version of xxHash is used in FFAStrans?
@ThomasM before i forget, in case you did not notice, this means that in the next version of ffastrans, xxhash will deliver a 32bit hash...
emcodem, wrapping since 2009 you got the rhyme?
Re: Which version of xxHash is used in FFAStrans?
Oh... Would it be possiblebto implement both? xxHash32 and xxHash64?
First workaround for us will be to mark the result as xxHash32=[nnnnn]
Have a nice weekend!
Tom
First workaround for us will be to mark the result as xxHash32=[nnnnn]
Have a nice weekend!
Tom