rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Toggle main menu visibility
Loading...
Searching...
No Matches
link_sha256.h
Go to the documentation of this file.
1
16
#ifndef RCBENCH_LINK_SHA256_H
17
#define RCBENCH_LINK_SHA256_H
18
19
#include <stddef.h>
20
#include <stdint.h>
21
22
#ifdef __cplusplus
23
extern
"C"
{
24
#endif
25
27
#define LINK_SHA256_BYTES 32u
28
32
typedef
struct
{
33
uint32_t
h
[8];
34
uint64_t
length
;
35
uint8_t
block
[64];
36
}
link_sha256_t
;
37
43
void
link_sha256_init
(
link_sha256_t
*
s
);
44
52
void
link_sha256_update
(
link_sha256_t
*
s
,
const
void
*data,
size_t
len);
53
60
void
link_sha256_final
(
link_sha256_t
*
s
, uint8_t out[
LINK_SHA256_BYTES
]);
61
69
void
link_sha256
(
const
void
*data,
size_t
len, uint8_t out[
LINK_SHA256_BYTES
]);
70
71
#ifdef __cplusplus
72
}
73
#endif
74
75
#endif
/* RCBENCH_LINK_SHA256_H */
s
#define s
Short name for esc_stick_s inside the five stick-class files.
Definition
esc_stick_panel_int.h:295
link_sha256_final
void link_sha256_final(link_sha256_t *s, uint8_t out[LINK_SHA256_BYTES])
Pad, finish and write the 32-byte digest. s is spent afterwards.
Definition
link_sha256.c:138
LINK_SHA256_BYTES
#define LINK_SHA256_BYTES
Bytes in a digest.
Definition
link_sha256.h:27
link_sha256_init
void link_sha256_init(link_sha256_t *s)
Start a computation: set the initial hash value and clear the state.
Definition
link_sha256.c:100
link_sha256
void link_sha256(const void *data, size_t len, uint8_t out[LINK_SHA256_BYTES])
The digest of len bytes in one call.
Definition
link_sha256.c:167
link_sha256_update
void link_sha256_update(link_sha256_t *s, const void *data, size_t len)
Fold len bytes in. data may be NULL when len is 0.
Definition
link_sha256.c:116
link_sha256_t
The state of a SHA-256 computation in progress.
Definition
link_sha256.h:32
link_sha256_t::length
uint64_t length
Definition
link_sha256.h:34
link_sha256_t::block
uint8_t block[64]
Definition
link_sha256.h:35
link_sha256_t::h
uint32_t h[8]
Definition
link_sha256.h:33
shared
link
include
link_sha256.h
Generated by
1.18.0