1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
/*
* AIDE (Advanced Intrusion Detection Environment)
*
* Copyright (C) 2020,2022,2024,2025 Hannes von Haugwitz
*
* 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 2 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, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef _HASHSUM_H_INCLUDED
#define _HASHSUM_H_INCLUDED
#include "attributes.h"
#include <stdbool.h>
typedef struct {
ATTRIBUTE attribute;
int length;
} hashsum_t;
typedef enum {
hash_md5=0,
hash_sha1,
hash_sha256,
hash_sha512,
hash_rmd160,
hash_tiger,
hash_crc32,
hash_crc32b,
hash_haval,
hash_whirlpool,
hash_gostr3411_94,
hash_stribog256,
hash_stribog512,
hash_sha512_256,
hash_sha3_256,
hash_sha3_512,
num_hashes,
} HASHSUM;
/* max length of hashsum in hashsums[] defined in hashsum.c */
#define HASHSUM_MAX_LENGTH 64
extern hashsum_t hashsums[];
extern int algorithms[];
extern DB_ATTR_TYPE DEPRECATED_HASHES;
extern DB_ATTR_TYPE REMOVED_HASHES;
void init_hashsum_lib(void);
DB_ATTR_TYPE get_hashes(bool);
DB_ATTR_TYPE validate_hashes(DB_ATTR_TYPE, int, char*, char*);
DB_ATTR_TYPE get_transition_hashsums(char *, DB_ATTR_TYPE, char *, DB_ATTR_TYPE);
DB_ATTR_TYPE get_hashsums_to_ignore(char *, DB_ATTR_TYPE, char *, DB_ATTR_TYPE);
#endif /* _HASHSUM_H_INCLUDED */
|