n2n/include/pearson.h

37 lines
1.1 KiB
C
Raw Normal View History

2020-06-17 06:54:02 +02:00
/**
* (C) 2007-21 - ntop.org and contributors
2020-06-17 06:54:02 +02:00
*
* This program 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; either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 see <http://www.gnu.org/licenses/>
*
*/
#include <stddef.h>
#include <stdint.h>
#include "portable_endian.h"
2020-06-13 15:40:39 +02:00
void pearson_hash_256 (uint8_t *out, const uint8_t *in, size_t len);
2020-06-16 09:42:38 +02:00
void pearson_hash_128 (uint8_t *out, const uint8_t *in, size_t len);
2020-06-29 11:59:51 +02:00
uint64_t pearson_hash_64 (const uint8_t *in, size_t len);
uint32_t pearson_hash_32 (const uint8_t *in, size_t len);
2020-06-29 11:59:51 +02:00
uint16_t pearson_hash_16 (const uint8_t *in, size_t len);
2020-07-02 09:04:25 +02:00
Basic C Code lint checker and shell checker (#859) * Factor build packages out into a more maintainable list * Create a location for scripts to live * Provide a make target to return the source dir as close as reasonable to the original distributed state * Add a code lint step, checking the coding style * Change test harness as recommended by shellcheck * Ensure we actually have the linter tool installed * Use the correct directory for cmake to run the tests * Adjust for the older uncrustify in the current github ubuntu-latest * Make one file pass the linter * Integrate the lint with the existing test workflow * Add files with minimal changes needed to the linter * Add more files with minimal changes needed to the linter * Dont build binaries if we fail the lint test * Update the phony targets with the lint steps * Ensure the flake8 package is installed in the new lint workflow job * Use the makefile to drive the packages needed to install for linting * No need to add dependancies on lint, just rely on the workflow status to show failure * Update the scripts dir README to reflect current assumptions * Rename and briefly document the indent.sh script * Fix the ignore to ignore the right Makefile * Rename the test_harness script to make it clear it is a shell script * Provide a master lint make target and add a shell script lint tool * Elminate stray tabs * Drop include/auth.h from linter - there are inconsistant results with function definitions when using the current uncrustify rules
2021-10-23 21:36:18 +02:00
void pearson_hash_init ();