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,
|
|
|
|
|
2016-07-26 15:53:52 +00:00
|
|
|
MH_H_COUNT // number of hash functions
|
2016-07-26 10:54:37 +00:00
|
|
|
} mh_hash;
|
|
|
|
|
2016-07-29 17:05:11 +00:00
|
|
|
int mh_hash_length(const unsigned char multihash[], int len, int *hash_length);
|
2016-07-26 10:54:37 +00:00
|
|
|
|
2016-07-29 17:05:11 +00:00
|
|
|
int mh_hash_function(const unsigned char multihash[], int len, mh_hash *hash);
|
2016-07-26 10:54:37 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|