core: hash: add support for hashing the contents of ropes
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
#define B_DIGEST_LENGTH_SHAKE256 B_DIGEST_LENGTH_256
|
||||
|
||||
struct b_hash_function_ops;
|
||||
struct b_rope;
|
||||
|
||||
typedef enum b_hash_function {
|
||||
B_HASH_NONE = 0,
|
||||
@@ -103,6 +104,7 @@ BLUE_API uint64_t b_hash_cstr_ex(const char *s, size_t *len);
|
||||
BLUE_API b_status b_hash_ctx_init(b_hash_ctx *ctx, b_hash_function func);
|
||||
BLUE_API b_status b_hash_ctx_reset(b_hash_ctx *ctx);
|
||||
BLUE_API b_status b_hash_ctx_update(b_hash_ctx *ctx, const void *p, size_t len);
|
||||
BLUE_API b_status b_hash_ctx_update_rope(b_hash_ctx *ctx, const struct b_rope *rope);
|
||||
BLUE_API b_status b_hash_ctx_finish(
|
||||
b_hash_ctx *ctx, void *out_digest, size_t out_max);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user