Qu Wenruo | 0e7b854 | 2020-06-24 18:02:48 +0200 | [diff] [blame] | 1 | #ifndef CRYPTO_HASH_H |
| 2 | #define CRYPTO_HASH_H |
| 3 | |
| 4 | #include <linux/types.h> |
| 5 | |
| 6 | #define CRYPTO_HASH_SIZE_MAX 32 |
| 7 | |
| 8 | void btrfs_hash_init(void); |
| 9 | int hash_crc32c(const u8 *buf, size_t length, u8 *out); |
| 10 | int hash_xxhash(const u8 *buf, size_t length, u8 *out); |
| 11 | int hash_sha256(const u8 *buf, size_t length, u8 *out); |
Qu Wenruo | c527687 | 2021-12-27 14:12:08 +0800 | [diff] [blame] | 12 | int hash_blake2(const u8 *buf, size_t length, u8 *out); |
Qu Wenruo | 0e7b854 | 2020-06-24 18:02:48 +0200 | [diff] [blame] | 13 | |
| 14 | u32 crc32c(u32 seed, const void * data, size_t len); |
| 15 | |
| 16 | /* Blake2B is not yet supported due to lack of library */ |
| 17 | |
| 18 | #endif |