Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../opt/alt/ruby27/include/ruby
File: digest.h
/************************************************
[0] Fix | Delete
[1] Fix | Delete
digest.h - header file for ruby digest modules
[2] Fix | Delete
[3] Fix | Delete
$Author$
[4] Fix | Delete
created at: Fri May 25 08:54:56 JST 2001
[5] Fix | Delete
[6] Fix | Delete
[7] Fix | Delete
Copyright (C) 2001-2006 Akinori MUSHA
[8] Fix | Delete
[9] Fix | Delete
$RoughId: digest.h,v 1.3 2001/07/13 15:38:27 knu Exp $
[10] Fix | Delete
$Id$
[11] Fix | Delete
[12] Fix | Delete
************************************************/
[13] Fix | Delete
[14] Fix | Delete
#include "ruby.h"
[15] Fix | Delete
[16] Fix | Delete
#define RUBY_DIGEST_API_VERSION 3
[17] Fix | Delete
[18] Fix | Delete
typedef int (*rb_digest_hash_init_func_t)(void *);
[19] Fix | Delete
typedef void (*rb_digest_hash_update_func_t)(void *, unsigned char *, size_t);
[20] Fix | Delete
typedef int (*rb_digest_hash_finish_func_t)(void *, unsigned char *);
[21] Fix | Delete
[22] Fix | Delete
typedef struct {
[23] Fix | Delete
int api_version;
[24] Fix | Delete
size_t digest_len;
[25] Fix | Delete
size_t block_len;
[26] Fix | Delete
size_t ctx_size;
[27] Fix | Delete
rb_digest_hash_init_func_t init_func;
[28] Fix | Delete
rb_digest_hash_update_func_t update_func;
[29] Fix | Delete
rb_digest_hash_finish_func_t finish_func;
[30] Fix | Delete
} rb_digest_metadata_t;
[31] Fix | Delete
[32] Fix | Delete
#define DEFINE_UPDATE_FUNC_FOR_UINT(name) \
[33] Fix | Delete
void \
[34] Fix | Delete
rb_digest_##name##_update(void *ctx, unsigned char *ptr, size_t size) \
[35] Fix | Delete
{ \
[36] Fix | Delete
const unsigned int stride = 16384; \
[37] Fix | Delete
\
[38] Fix | Delete
for (; size > stride; size -= stride, ptr += stride) { \
[39] Fix | Delete
name##_Update(ctx, ptr, stride); \
[40] Fix | Delete
} \
[41] Fix | Delete
if (size > 0) name##_Update(ctx, ptr, size); \
[42] Fix | Delete
}
[43] Fix | Delete
[44] Fix | Delete
#define DEFINE_FINISH_FUNC_FROM_FINAL(name) \
[45] Fix | Delete
int \
[46] Fix | Delete
rb_digest_##name##_finish(void *ctx, unsigned char *ptr) \
[47] Fix | Delete
{ \
[48] Fix | Delete
return name##_Final(ptr, ctx); \
[49] Fix | Delete
}
[50] Fix | Delete
[51] Fix | Delete
static inline VALUE
[52] Fix | Delete
rb_digest_namespace(void)
[53] Fix | Delete
{
[54] Fix | Delete
rb_require("digest");
[55] Fix | Delete
return rb_path2class("Digest");
[56] Fix | Delete
}
[57] Fix | Delete
[58] Fix | Delete
static inline ID
[59] Fix | Delete
rb_id_metadata(void)
[60] Fix | Delete
{
[61] Fix | Delete
return rb_intern_const("metadata");
[62] Fix | Delete
}
[63] Fix | Delete
[64] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function