18 #define RUBY_DIGEST_API_VERSION 3 34 #define DEFINE_UPDATE_FUNC_FOR_UINT(name) \ 36 rb_digest_##name##_update(void *ctx, unsigned char *ptr, size_t size) \ 38 const unsigned int stride = 16384; \ 40 for (; size > stride; size -= stride, ptr += stride) { \ 41 name##_Update(ctx, ptr, stride); \ 43 if (size > 0) name##_Update(ctx, ptr, size); \ 46 #define DEFINE_FINISH_FUNC_FROM_FINAL(name) \ 48 rb_digest_##name##_finish(void *ctx, unsigned char *ptr) \ 50 return name##_Final(ptr, ctx); \
int(* rb_digest_hash_finish_func_t)(void *, unsigned char *)
void(* rb_digest_hash_update_func_t)(void *, unsigned char *, size_t)
int(* rb_digest_hash_init_func_t)(void *)