From 50938caee55064722c2aebda177ddb463aaed58c Mon Sep 17 00:00:00 2001 From: knu Date: Wed, 11 Oct 2006 05:15:15 +0000 Subject: * ext/digest/digest.c (rb_digest_base_reset, Init_digest): Add Digest::Base#reset. * ext/digest/digest.h: Update the header comment. * ext/digest/md5/md5ossl.h, ext/digest/md5/md5init.c (Init_md5): Define DIGEST_LENGTH and BLOCK_LENGTH. * ext/digest/rmd160/rmd160init.c (Init_rmd160): Ditto. * ext/digest/sha1/sha1init.c (Init_sha1): Ditto. * ext/digest/sha2/sha2init.c (Init_sha2): Ditto. * ext/digest/depend, ext/digest/extconf.rb: Use $INSTALLFILES rather than adding make targets. [Pointed out by: nobu] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/digest/sha1/sha1init.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ext/digest/sha1') diff --git a/ext/digest/sha1/sha1init.c b/ext/digest/sha1/sha1init.c index a704dcbfd..8a132e4e2 100644 --- a/ext/digest/sha1/sha1init.c +++ b/ext/digest/sha1/sha1init.c @@ -29,6 +29,9 @@ 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_cvar_set(cDigest_SHA1, rb_intern("metadata"), Data_Wrap_Struct(rb_cObject, 0, 0, &sha1), Qtrue); } -- cgit