pyguymer3.sha512_of_MP4¶
- pyguymer3.sha512_of_MP4(fname, /, *, chunksize=1048576, ignoreModificationTime=True)[source]¶
Find the SHA-512 hash of a MP4 file
This function returns the SHA-512 hash of the passed MP4 file as if the “Modification Time” field (in the “mvhd” atom in the “moov” atom) is set to zero. Using this function it is possible to discover that the only binary difference between two different MP4 files is the “Modification Time” field (in the “mvhd” atom in the “moov” atom).
If this function is told not to ignore the “Modification Time” field (in the “mvhd” atom in the “moov” atom) then this function will return the SHA-512 identically to any other method.
- Parameters:
- Returns:
hexdigest – The hash hexdigest of the input MP4 file.
- Return type:
Notes
The following websites have some very useful information on how to parse MP4 files - the first just forgot to say that integers are big-endian:
Copyright 2017 Thomas Guymer [1]
References