summaryrefslogtreecommitdiff
path: root/ext/digest/sha1/sha1init.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/digest/sha1/sha1init.c')
-rw-r--r--ext/digest/sha1/sha1init.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/digest/sha1/sha1init.c b/ext/digest/sha1/sha1init.c
index a704dcbfde..e56f18bf63 100644
--- a/ext/digest/sha1/sha1init.c
+++ b/ext/digest/sha1/sha1init.c
@@ -14,7 +14,6 @@ static algo_t sha1 = {
(hash_init_func_t)SHA1_Init,
(hash_update_func_t)SHA1_Update,
(hash_finish_func_t)SHA1_Finish,
- (hash_equal_func_t)SHA1_Equal,
};
void
@@ -29,6 +28,9 @@ Init_sha1()
cDigest_SHA1 = rb_define_class_under(mDigest, "SHA1", cDigest_Base);
- rb_cvar_set(cDigest_SHA1, rb_intern("metadata"),
- Data_Wrap_Struct(rb_cObject, 0, 0, &sha1), Qtrue);
+ rb_define_const(cDigest_SHA1, "DIGEST_LENGTH", INT2NUM(SHA1_DIGEST_LENGTH));
+ rb_define_const(cDigest_SHA1, "BLOCK_LENGTH", INT2NUM(SHA1_BLOCK_LENGTH));
+
+ rb_ivar_set(cDigest_SHA1, rb_intern("metadata"),
+ Data_Wrap_Struct(rb_cObject, 0, 0, &sha1));
}