CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
Ardupilot

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: Ardupilot/ardupilot
Path: blob/master/Tools/AP_Bootloader/md5.h
Views: 1798
1
#ifndef MD5_H
2
#define MD5_H
3
#ifndef HEADER_MD5_H
4
/* Try to avoid clashes with OpenSSL */
5
#define HEADER_MD5_H
6
#endif
7
8
// swiped and modified from tridge's junk code repository -pb20220818
9
#include "stdint.h"
10
#define uint32 uint32_t
11
// ignore cast errors in this case to keep complexity down
12
// on x86 where replay is run we don't care about cast alignment
13
14
struct MD5Context {
15
uint32 buf[4];
16
uint32 bits[2];
17
unsigned char in[64];
18
};
19
20
void MD5Init(struct MD5Context *context);
21
void MD5Update(struct MD5Context *context, unsigned char const *buf,
22
unsigned len);
23
void MD5Final(unsigned char digest[16], struct MD5Context *context);
24
25
/*
26
* This is needed to make RSAREF happy on some MS-DOS compilers.
27
*/
28
typedef struct MD5Context MD5_CTX;
29
30
#endif /* !MD5_H */
31
32