Implement predefined CRCs and add libfort
This commit is contained in:
23
include/patchelfcrc/named_crcs.h
Normal file
23
include/patchelfcrc/named_crcs.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef _NAMED_CRCS_H_
|
||||
#define _NAMED_CRCS_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
struct crc_settings {
|
||||
uint32_t polynomial;
|
||||
uint32_t xor;
|
||||
uint32_t start_value;
|
||||
bool rev;
|
||||
};
|
||||
|
||||
struct named_crc {
|
||||
const char *name;
|
||||
struct crc_settings settings;
|
||||
};
|
||||
|
||||
const struct named_crc *reverse_lookup_named_crc(const struct crc_settings *settings);
|
||||
|
||||
const struct named_crc *lookup_named_crc(const char *name);
|
||||
|
||||
#endif /* _NAMED_CRCS_H_ */
|
Reference in New Issue
Block a user