aboutsummaryrefslogblamecommitdiffstats
path: root/libhashsum_init_blakeb_hasher.c
blob: 42cdb1688aaf8426f4487a3569ec006dc61fe0e9 (plain) (tree)
1
2
3
4
5
6
7
8
9





                                                         
                                                                                                

                             
                                                                   
                             
                                                                   







                       
                                                                                                


                        
                    



                       
/* See LICENSE file for copyright and license details. */
#include "common.h"
#ifdef SUPPORT_BLAKEB


int
libhashsum_init_blakeb_hasher(struct libhashsum_hasher *this, size_t hashbits, const void *salt)
{
	if (hashbits == 384U)
		return libhashsum_init_blake384_hasher(this, salt);
	if (hashbits == 512U)
		return libhashsum_init_blake512_hasher(this, salt);

	errno = EINVAL;
	return -1;
}


#else
int
libhashsum_init_blakeb_hasher(struct libhashsum_hasher *this, size_t hashbits, const void *salt)
{
	(void) this;
	(void) hashbits;
	(void) salt;
	errno = ENOSYS;
	return -1;
}
#endif