blob: 32bf9a38fc2e2d37b0f17f9c2477f2b1f111f584 (
plain) (
tree)
|
|
/* See LICENSE file for copyright and license details. */
#include "common.h"
#ifdef SUPPORT_BLAKES
int
libhashsum_init_blakes_hasher(struct libhashsum_hasher *this, size_t hashbits, const void *salt)
{
if (hashbits == 224U)
return libhashsum_init_blake224_hasher(this, salt);
if (hashbits == 256U)
return libhashsum_init_blake256_hasher(this, salt);
errno = EINVAL;
return -1;
}
#else
int
libhashsum_init_blakes_hasher(struct libhashsum_hasher *this, size_t hashbits, const void *salt)
{
(void) this;
(void) hashbits;
(void) salt;
errno = ENOSYS;
return -1;
}
#endif
|