2022-03-21 14:25:48 +00:00
|
|
|
#ifndef COSMOPOLITAN_THIRD_PARTY_ARGON2_ENCODING_H_
|
|
|
|
#define COSMOPOLITAN_THIRD_PARTY_ARGON2_ENCODING_H_
|
2021-09-16 00:24:36 +00:00
|
|
|
#include "third_party/argon2/argon2.h"
|
2022-03-21 14:25:48 +00:00
|
|
|
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
|
|
|
COSMOPOLITAN_C_START_
|
2021-09-15 23:57:18 +00:00
|
|
|
|
2022-03-21 14:25:48 +00:00
|
|
|
#define ARGON2_MAX_DECODED_LANES UINT32_C(255)
|
2021-09-15 23:57:18 +00:00
|
|
|
#define ARGON2_MIN_DECODED_SALT_LEN UINT32_C(8)
|
2022-03-21 14:25:48 +00:00
|
|
|
#define ARGON2_MIN_DECODED_OUT_LEN UINT32_C(12)
|
2021-09-15 23:57:18 +00:00
|
|
|
|
2022-03-21 14:25:48 +00:00
|
|
|
int encode_string(char *, size_t, argon2_context *, argon2_type);
|
|
|
|
int decode_string(argon2_context *, const char *, argon2_type);
|
|
|
|
size_t b64len(uint32_t);
|
|
|
|
size_t numlen(uint32_t);
|
2021-09-15 23:57:18 +00:00
|
|
|
|
2022-03-21 14:25:48 +00:00
|
|
|
COSMOPOLITAN_C_END_
|
|
|
|
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
|
|
|
#endif /* COSMOPOLITAN_THIRD_PARTY_ARGON2_ENCODING_H_ */
|