2020-06-24 16:02:48 +00:00
|
|
|
#ifndef CRYPTO_HASH_H
|
|
|
|
#define CRYPTO_HASH_H
|
|
|
|
|
|
|
|
#include <linux/types.h>
|
|
|
|
|
|
|
|
#define CRYPTO_HASH_SIZE_MAX 32
|
|
|
|
|
|
|
|
void btrfs_hash_init(void);
|
|
|
|
int hash_crc32c(const u8 *buf, size_t length, u8 *out);
|
|
|
|
int hash_xxhash(const u8 *buf, size_t length, u8 *out);
|
|
|
|
int hash_sha256(const u8 *buf, size_t length, u8 *out);
|
2021-12-27 06:12:08 +00:00
|
|
|
int hash_blake2(const u8 *buf, size_t length, u8 *out);
|
2020-06-24 16:02:48 +00:00
|
|
|
|
|
|
|
u32 crc32c(u32 seed, const void * data, size_t len);
|
|
|
|
|
|
|
|
/* Blake2B is not yet supported due to lack of library */
|
|
|
|
|
|
|
|
#endif
|