xxhsum - compute a fast *non crypto-robust* message digest
xxhsum file
XXH is a very high performance, high quality checksum generation algorithm internally used by open-lmake to find out whether file was actually modified or not when its date is changed.
XXH is not crypto-robust. This means that you can defeat it if you write a code specially aimed at this purpose, but not otherwise, by chance.
The version used in open-lmake is 56/64 bits : Checksums are computed on 64 bits but when comparing 2 checksums, if they match on 56 (lsb) bits but not on the full 64 bits, open-lmake will consider we enter into a danger zone and will stop and report the problem. Theoretical computation gives that you can generate thousands of files per second for thousands of year before entering the danger zone.
xxhsum allow you to generate the checksum of a file, as distinguished by open-lmake.
Because open-lmake handles symbolic links as themselves and not as the file they point to (i.e. open-lmake works in the physical world), xxhsum does not follow symbolic links. The generated checksums are put in different spaces whether they are regular files or symbolic links.
Also, the execute permission bit is used to compute the checksum of regular files. open-lmake does not handle permission bits (read and write permissions), but the execute bit is a semantic bit (possibly in addition to security) and thus is managed as file content.
Dirs and other awkward files (i.e. neither a regular file or a symbolic link) are handled as if they did not exist.
A checksum is a 16-hex digit number followed by -R for regular files or -L for symbolic links (e.g. 1234567890123456-R). The following special cases produce dedicated outputs :
• |
file does not exist : output is none |
|||
• |
file is a non-executable regular empty file : output is empty-R |
xxhsum exits with a status of zero if the checksum could be computed. Else it exits with a non-zero status.
The checksum on a single line.
lautodep(1), lcheck_deps(1), ldebug(1), ldecode(1), ldepend(1), lencode(1), lforget(1), lmake(1), lmark(1), lrepair(1), lrun_cc(1), lshow(1), ltarget(1)
The python module lmake.
The full open-lmake documentation in <open-lmake-installation-dir>/docs/index.html.
Copyright © 2023-2025, Doliam. This file is part of open-lmake.
open-lmake is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 of the License.
open-lmake is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
For the xxh library :
Copyright © 2012-2023 Yann Collet
BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php)
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
• |
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. | ||
• |
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. |
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
You can contact the author at:
• |
xxHash homepage: https://www.xxhash.com |
|||
• |
xxHash source repository: https://github.com/Cyan4973/xxHash |