aboutsummaryrefslogtreecommitdiffstats
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.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/digest/sha1/sha1init.c b/ext/digest/sha1/sha1init.c
index 60fb457bf9..68c7637ab8 100644
--- a/ext/digest/sha1/sha1init.c
+++ b/ext/digest/sha1/sha1init.c
@@ -9,7 +9,9 @@
#endif
static algo_t sha1 = {
+ 1,
SHA1_DIGEST_LENGTH,
+ SHA1_BLOCK_LENGTH,
sizeof(SHA1_CTX),
(hash_init_func_t)SHA1_Init,
(hash_update_func_t)SHA1_Update,
@@ -33,9 +35,6 @@ Init_sha1()
cDigest_SHA1 = rb_define_class_under(mDigest, "SHA1", cDigest_Base);
- 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));
}