1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@11122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
knu 2006-10-11 05:15:15 +00:00
parent 55b9887f97
commit cd58f3313e
10 changed files with 64 additions and 9 deletions

View file

@ -38,6 +38,9 @@ Init_sha2()
#define DEFINE_ALGO_CLASS(bitlen) \
cDigest_SHA##bitlen = rb_define_class_under(mDigest, "SHA" #bitlen, cDigest_Base); \
\
rb_define_const(cDigest_SHA##bitlen, "DIGEST_LENGTH", INT2NUM(SHA##bitlen##_DIGEST_LENGTH)); \
rb_define_const(cDigest_SHA##bitlen, "BLOCK_LENGTH", INT2NUM(SHA##bitlen##_BLOCK_LENGTH)); \
\
rb_cvar_set(cDigest_SHA##bitlen, id_metadata, \
Data_Wrap_Struct(rb_cObject, 0, 0, &sha##bitlen), Qtrue);