21#ifndef PROTOCORE_CSRF_H
22#define PROTOCORE_CSRF_H
26#if PROTOCORE_ENABLE_CSRF
31#define CSRF_NONCE_BYTES 6
33#define CSRF_SIG_BYTES 14
35#define CSRF_TOKEN_BUF 48
45 const uint8_t *secret;
97 CsrfSecretArgs secret_args;
98 CsrfIssueArgs issue_args;
99 CsrfVerifyArgs verify_args;
106extern CsrfVars CsrfV;
111 void (*
const set_secret)(uint8_t *work);
112 void (*
const issue)(uint8_t *work);
113 void (*
const verify)(uint8_t *work);
114 void (*
const reset)(uint8_t *work);
119void protocore_csrf_set_secret(uint8_t *work);
120void protocore_csrf_issue(uint8_t *work);
121void protocore_csrf_verify(uint8_t *work);
122void protocore_csrf_reset(uint8_t *work);
128static const CsrfNs Csrf __attribute__((unused)) = {
129 .set_secret = protocore_csrf_set_secret,
130 .issue = protocore_csrf_issue,
131 .verify = protocore_csrf_verify,
132 .reset = protocore_csrf_reset,
144uint8_t *protocore_csrf_span(
void);
#define PROTOCORE_BEGIN_DECLS
Give a header's declarations C linkage, so their symbol names carry no parameter types.
_Bool proto_bool
The truth value.
#define PROTOCORE_END_DECLS