[Feature #10452][ruby-core:66001][ci skip]
* remove HMAC from list of digest algorithms,
* add MD5 in list of digest algorithms,
* add information about writing a C digest implementation using Digest::Base,
* add documentation for Digest::Base public methods.
* ext/digest/md5/md5init.c: add examples for MD5.
* ext/digest/rmd160/rmd160init.c: add examples for Digest::RMD160.
* ext/digest/sha1/sha1init.c: add examples for Digest::SHA1.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/mkmf.rb (create_makefile): store $headers in LOCAL_HDRS for
depend files.
* ext/digest/digest_conf.rb (digest_conf): add implementation
specific headers to $header.
* ext/digest/{md5,rmd160,sha1,sha2}/depend: add LOCAL_HDRS to the
dependencies.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/digest/{md5,rmd160,sha1,sha2}/extconf.rb: configure OpenSSL
only if bundled libraries is not used, so that OpenSSL is not
linked unnecessarily. [ruby-core:65404] [Bug #10324]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/digest/rmd160/extconf.rb: fix transform function name to
check. [ruby-core:65091] [Bug #10252]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/digest: make built-in digest function implementations
indicate success or failure of init and final functions.
[ruby-core:61614] [Bug #9659]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
rb_ to avoid name clash in writing extensions.
* ext/digest: Introduce Digest::Class and Digest::Instance for
ease of implementing subclasses and add-ons, inspried by
gotoyuzo.
* ext/digest: The Digest::Instance module now requires and assumes
that any instance be resettable and clonable, and add some
convenient instance methods such as "new()", for creating a new
copy, parameter taking "digest()" and "hexdigest()", for instant
calculation. These methods make digest instances work just like
digest classes.
* ext/digest/sha2/lib/digest/sha2.rb:
Add the Digest::SHA2 class to wrap up SHA2 variants: SHA256,
SHA384 and SHA512, hoping this module would make a decent
example of a digest subclass written in Ruby.
* ext/digest/lib/digest.rb: Adjust autoload entries for SHA2
classes.
* ext/digest/lib/digest/hmac.rb: Follow the framework updates.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ext/digest/md5/md5init.c, ext/digest/rmd160/rmd160init.c,
ext/digest/sha1/sha1init.c, ext/digest/sha2/sha2init.c:
Introduce API versioning.
* ext/digest/digest.c, ext/digest/digest.h,
ext/digest/md5/md5init.c, ext/digest/rmd160/rmd160init.c,
ext/digest/sha1/sha1init.c, ext/digest/sha2/sha2init.c: Remove
the constants DIGEST_LENGTH and BLOCK_LENGTH and turn them into
instance methods digest_length() and block_length(). Class
methods with the same names are also provided, which take extra
parameters for a digest method.
* ext/digest/lib/digest/hmac.rb: Completely redesign the API which
is similar to Perl's, now that Digest classes can take hashing
parameters.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
variable of a class object instead of a class variable for
metadata. This change is crucial for ruby 1.8 and applying it
also to the trunk will assure compatibilities.
* ext/digest/md5/md5init.c (Init_md5): Ditto.
* ext/digest/rmd160/rmd160init.c (Init_rmd160): Ditto.
* ext/digest/sha1/sha1init.c (Init_sha1): Ditto.
* ext/digest/sha2/sha2init.c (Init_sha2): Ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
rb_digest_base_equal): Simplify the equality check and just
compare resulted digests since state-level equality should
not be significant.
* ext/digest/digest.h: Ditto.
* ext/digest/*/*.[ch]: Ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
hash_final_func_t was inconsistent with others, change it and
rename to hash_finish_func_t to avoid confusion.
* ext/digest/digest.[ch]: Remove and eliminate the use of
hash_end_func_t. Implement hexdigest conversion in the base
class.
* ext/digest/md5/md5.c, ext/digest/md5/md5.h,
ext/digest/md5/md5init.c, ext/digest/md5/md5ossl.c,
ext/digest/md5/md5ossl.h: Remove MD5_End() and change
MD5_Final() to MD5_Finish().
* ext/digest/rmd160/depend, ext/digest/rmd160/extconf.rb,
ext/digest/rmd160/rmd160.c, ext/digest/rmd160/rmd160.h,
ext/digest/rmd160/rmd160hl.c, ext/digest/rmd160/rmd160init.c,
ext/digest/rmd160/rmd160ossl.c, ext/digest/rmd160/rmd160ossl.h:
Remove unused functions RMD160_End(), RMD160_File(),
RMD160_Data() and change RMD160_Final() to RMD160_Finish().
* ext/digest/sha1/extconf.rb, ext/digest/sha1/sha1.c,
ext/digest/sha1/sha1.h, ext/digest/sha1/sha1hl.c,
ext/digest/sha1/sha1init.c, ext/digest/sha1/sha1ossl.c,
ext/digest/sha1/sha1ossl.h: Likewise.
* ext/digest/sha2/extconf.rb, ext/digest/sha2/sha2.c,
ext/digest/sha2/sha2.h, ext/digest/sha2/sha2hl.c,
ext/digest/sha2/sha2init.c: Likewise.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ext/digest/sha1/sha1ossl.c, ext/readline/readline.c: move
incluion of config.h to pacify AIX. a patch from Yutaka
Kanemoto <kinpoco at gmail.com>. [ruby-dev:29197]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
macros moved to extconf.h.
* ext/extmk.rb (extract_makefile, extmk): made RUBY_EXTCONF_H and
EXTSTATIC permanent.
* ext/{dbm,digest/*,socket,zlib}/extconf.rb: used $defs and $INCFLAGS.
* {bcc32,win32,wince}/Makefile.sub (COMPILE_C, COMPILE_CXX): added
$(INCFLAGS).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e