c-multihash/include/mh/hashes.h

29 lines
501 B
C
Raw Normal View History

2016-07-26 10:54:37 +00:00
/* vim: set ts=8 sw=8 noexpandtab: */
2016-07-26 11:00:54 +00:00
#include "errors.h"
2016-07-26 10:54:37 +00:00
// list of avaliable hash functions.
typedef enum {
MH_H_SHA1,
MH_H_SHA2_256,
MH_H_SHA2_512,
MH_H_SHA3_512,
MH_H_SHA3_384,
MH_H_SHA3_256,
MH_H_SHA3_224,
MH_H_SHAKE_128,
MH_H_SHAKE_256,
MH_H_BLAKE2B,
MH_H_BLAKE2S,
MH_H_COUNT // number of hash functions
2016-07-26 10:54:37 +00:00
} mh_hash;
int mh_hash_length(const unsigned char multihash[], int len, int *hash_length);
2016-07-26 10:54:37 +00:00
int mh_hash_function(const unsigned char multihash[], int len, mh_hash *hash);
2016-07-26 10:54:37 +00:00