Ruby  3.1.0dev(2021-09-10revisionb76ad15ed0da636161de0243c547ee1e6fc95681)
Data Structures | Macros | Typedefs
digest.h File Reference

(b76ad15ed0da636161de0243c547ee1e6fc95681)

#include "ruby.h"
Include dependency graph for digest.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  rb_digest_metadata_t
 

Macros

#define RUBY_DIGEST_API_VERSION   3
 
#define DEFINE_UPDATE_FUNC_FOR_UINT(name)
 
#define DEFINE_FINISH_FUNC_FROM_FINAL(name)
 
#define RUBY_UNTYPED_DATA_WARNING   0
 

Typedefs

typedef int(* rb_digest_hash_init_func_t) (void *)
 
typedef void(* rb_digest_hash_update_func_t) (void *, unsigned char *, size_t)
 
typedef int(* rb_digest_hash_finish_func_t) (void *, unsigned char *)
 

Macro Definition Documentation

◆ DEFINE_FINISH_FUNC_FROM_FINAL

#define DEFINE_FINISH_FUNC_FROM_FINAL (   name)
Value:
int \
rb_digest_##name##_finish(void *ctx, unsigned char *ptr) \
{ \
return name##_Final(ptr, ctx); \
}

Definition at line 46 of file digest.h.

◆ DEFINE_UPDATE_FUNC_FOR_UINT

#define DEFINE_UPDATE_FUNC_FOR_UINT (   name)
Value:
void \
rb_digest_##name##_update(void *ctx, unsigned char *ptr, size_t size) \
{ \
const unsigned int stride = 16384; \
\
for (; size > stride; size -= stride, ptr += stride) { \
name##_Update(ctx, ptr, stride); \
} \
if (size > 0) name##_Update(ctx, ptr, size); \
}

Definition at line 34 of file digest.h.

◆ RUBY_DIGEST_API_VERSION

#define RUBY_DIGEST_API_VERSION   3

Definition at line 18 of file digest.h.

◆ RUBY_UNTYPED_DATA_WARNING

#define RUBY_UNTYPED_DATA_WARNING   0

Typedef Documentation

◆ rb_digest_hash_finish_func_t

typedef int(* rb_digest_hash_finish_func_t) (void *, unsigned char *)

Definition at line 22 of file digest.h.

◆ rb_digest_hash_init_func_t

typedef int(* rb_digest_hash_init_func_t) (void *)

Definition at line 20 of file digest.h.

◆ rb_digest_hash_update_func_t

typedef void(* rb_digest_hash_update_func_t) (void *, unsigned char *, size_t)

Definition at line 21 of file digest.h.

ptr
struct RIMemo * ptr
Definition: debug.c:87
size
rb_atomic_t size
Definition: signal.c:509
name
const char * name
Definition: nkf.c:208