summaryrefslogtreecommitdiff
path: root/ext/digest/md5/md5init.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/digest/md5/md5init.c')
-rw-r--r--ext/digest/md5/md5init.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/digest/md5/md5init.c b/ext/digest/md5/md5init.c
index 5fddb21c65..6fdf6e0a26 100644
--- a/ext/digest/md5/md5init.c
+++ b/ext/digest/md5/md5init.c
@@ -14,7 +14,6 @@ static algo_t md5 = {
(hash_init_func_t)MD5_Init,
(hash_update_func_t)MD5_Update,
(hash_finish_func_t)MD5_Finish,
- (hash_equal_func_t)MD5_Equal,
};
void
@@ -29,6 +28,9 @@ Init_md5()
cDigest_MD5 = rb_define_class_under(mDigest, "MD5", cDigest_Base);
- rb_cvar_set(cDigest_MD5, rb_intern("metadata"),
- Data_Wrap_Struct(rb_cObject, 0, 0, &md5), Qtrue);
+ rb_define_const(cDigest_MD5, "DIGEST_LENGTH", INT2NUM(MD5_DIGEST_LENGTH));
+ rb_define_const(cDigest_MD5, "BLOCK_LENGTH", INT2NUM(MD5_BLOCK_LENGTH));
+
+ rb_ivar_set(cDigest_MD5, rb_intern("metadata"),
+ Data_Wrap_Struct(rb_cObject, 0, 0, &md5));
}