aboutsummaryrefslogtreecommitdiffstats
path: root/libar2_hash_buf_size.c
blob: b165d4b3f9bbc5d64a2df99debf224c0d36e090d (plain) (blame)
1
2
3
4
5
6
7
8
9
/* See LICENSE file for copyright and license details. */
#include "common.h"


size_t
libar2_hash_buf_size(struct libar2_argon2_parameters *params)
{
	return (params->hashlen > 64 && (params->hashlen & 127)) ? (params->hashlen | 127) + 1 : params->hashlen;
}