Ruby 1.9.3p327(2012-11-10revision37606)
|
Go to the source code of this file.
Defines | |
#define | FOREACH_BITLEN(func) func(256) func(384) func(512) |
#define | DEFINE_ALGO_METADATA(bitlen) |
#define | DECLARE_ALGO_CLASS(bitlen) VALUE cDigest_SHA##bitlen; |
#define | DEFINE_ALGO_CLASS(bitlen) |
Functions | |
void | Init_sha2 () |
#define DECLARE_ALGO_CLASS | ( | bitlen | ) | VALUE cDigest_SHA##bitlen; |
Referenced by Init_sha2().
#define DEFINE_ALGO_CLASS | ( | bitlen | ) |
cDigest_SHA##bitlen = rb_define_class_under(mDigest, "SHA" #bitlen, cDigest_Base); \ \ rb_ivar_set(cDigest_SHA##bitlen, id_metadata, \ Data_Wrap_Struct(rb_cObject, 0, 0, (void *)&sha##bitlen));
Referenced by Init_sha2().
#define DEFINE_ALGO_METADATA | ( | bitlen | ) |
static const rb_digest_metadata_t sha##bitlen = { \ RUBY_DIGEST_API_VERSION, \ SHA##bitlen##_DIGEST_LENGTH, \ SHA##bitlen##_BLOCK_LENGTH, \ sizeof(SHA##bitlen##_CTX), \ (rb_digest_hash_init_func_t)SHA##bitlen##_Init, \ (rb_digest_hash_update_func_t)SHA##bitlen##_Update, \ (rb_digest_hash_finish_func_t)SHA##bitlen##_Finish, \ };
Definition at line 13 of file sha2init.c.
Definition at line 11 of file sha2init.c.
Referenced by Init_sha2().
void Init_sha2 | ( | ) |
Definition at line 32 of file sha2init.c.
References DECLARE_ALGO_CLASS, DEFINE_ALGO_CLASS, FOREACH_BITLEN, id_metadata, rb_intern, rb_path2class(), and rb_require().