libyggdrasil  v1.0.0
hash.h
Go to the documentation of this file.
1  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2  * _____.___. .___ .__.__ *
3  * \__ | | ____ ____ __| _/___________ _____|__| | *
4  * / | |/ ___\ / ___\ / __ |\_ __ \__ \ / ___/ | | *
5  * \____ / /_/ > /_/ > /_/ | | | \// __ \_\___ \| | |__ *
6  * / ______\___ /\___ /\____ | |__| (____ /____ >__|____/ *
7  * \/ /_____//_____/ \/ \/ \/ *
8  * - Midgard - *
9  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
10  * This software can be used by students and other personal of the *
11  * Bern University of Applied Sciences under the terms of the MIT *
12  * license. *
13  * For other persons this software is under the terms of the GNU *
14  * General Public License version 2. *
15  * *
16  * Copyright © 2021, Bern University of Applied Sciences. *
17  * All rights reserved. *
18  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
26 #include <c/common/types.h>
27 
28 #include <stm32f7xx_hal.h>
29 
36 
43 
54 C_LINKAGE u8 yggdrasil_HASH_getCRC8(void *data, size_t size, u8 initValue, u8 polynomial, u8 xorOut);
55 
66 C_LINKAGE u16 yggdrasil_HASH_getCRC16(void *data, size_t size, u16 initValue, u16 polynomial, u16 xorOut);
67 
78 C_LINKAGE u32 yggdrasil_HASH_getCRC32(void *data, size_t size, u32 initValue, u32 polynomial, u32 xorOut);
types.h
Commonly used type definitions and helper templates.
yggdrasil_HASH_Init
C_LINKAGE bool yggdrasil_HASH_Init(void)
Hash initialization.
Definition: hash.cpp:93
u16
uint16_t u16
Definition: types.h:37
u8
uint8_t u8
Unsigned integer definitions.
Definition: types.h:36
yggdrasil_HASH_getCRC32
C_LINKAGE u32 yggdrasil_HASH_getCRC32(void *data, size_t size, u32 initValue, u32 polynomial, u32 xorOut)
Hardware accelerated CRC32 caluclation.
Definition: hash.cpp:111
yggdrasil_HASH_getCRC16
C_LINKAGE u16 yggdrasil_HASH_getCRC16(void *data, size_t size, u16 initValue, u16 polynomial, u16 xorOut)
Hardware accelerated CRC16 caluclation.
Definition: hash.cpp:106
u32
uint32_t u32
Definition: types.h:38
yggdrasil_HASH_getCRC8
C_LINKAGE u8 yggdrasil_HASH_getCRC8(void *data, size_t size, u8 initValue, u8 polynomial, u8 xorOut)
Hardware accelerated CRC8 caluclation.
Definition: hash.cpp:101
yggdrasil_HASH_Deinit
C_LINKAGE bool yggdrasil_HASH_Deinit(void)
Hash deinitialization.
Definition: hash.cpp:97
C_LINKAGE
#define C_LINKAGE
Definition: attributes.h:43