2
0
Fork 0
mirror of https://git.sr.ht/~sircmpwn/mkproof synced 2024-06-01 22:06:12 +02:00

Missing size_t declaration

This commit is contained in:
Samuel Neves 2016-03-22 17:53:47 +00:00
parent ccd37c8749
commit 02bdff7729
2 changed files with 6 additions and 5 deletions

View File

@ -411,15 +411,16 @@ int encode_string(char *dst, size_t dst_len, argon2_context *ctx,
#undef SB
}
uint32_t b64len(uint32_t len) {
size_t b64len(uint32_t len) {
return ((len + 2) / 3) * 4;
}
uint32_t numlen(uint32_t num) {
uint32_t len = 1;
size_t numlen(uint32_t num) {
size_t len = 1;
while (num >= 10) {
++len;
num = num / 10;
}
return len;
}

View File

@ -32,9 +32,9 @@ int encode_string(char *dst, size_t dst_len, argon2_context *ctx,
int decode_string(argon2_context *ctx, const char *str, argon2_type type);
/* Returns the length of the encoded byte stream with length len */
uint32_t b64len(uint32_t len);
size_t b64len(uint32_t len);
/* Returns the length of the encoded number num */
uint32_t numlen(uint32_t num);
size_t numlen(uint32_t num);
#endif