Commit Graph

7 Commits

Author SHA1 Message Date
knu 945a76d97b * ext/digest/digest.c (rb_digest_base_alloc,
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
2006-10-11 12:43:58 +00:00
knu b9673f64f1 * ext/digest/digest.[ch]: Since the argument order of
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
2006-10-05 11:09:42 +00:00
matz de3bff164c * eval.c (rb_mod_define_method): should save safe_level in the
proc object.  [ruby-dev:28146]

* test/drb/drbtest.rb (DRbService::self.ext_service): increase
  timeout limit.  a patch from Kazuhiro NISHIYAMA
  <zn at mbf.nifty.com>. [ruby-dev:28132]

* eval.c (ev_const_get): fixed a bug in constant reference during
  instance_eval.  [yarv-dev:707]

* eval.c (ev_const_defined): ditto.

* lib/yaml.rb (YAML::add_domain_type): typo fixed.  a patch from
  Joel VanderWerf <vjoel at path.berkeley.edu>.
  [ruby-talk:165285] [ruby-core:6995]

* ext/digest/sha2/sha2.c (ULL): support AIX C.  a patch from
  Kailden <kailden at gmail.com>.  [ruby-core:06984]

* ext/syck/rubyext.c (rb_syck_compile): avoid potential memory
  leak.

* ext/syck/rubyext.c (syck_set_ivars): avoid potential memory
  leak by explicit symbol allocation.

* lib/delegate.rb (Delegator::method_missing): should delegate
  block as well.

* lib/cgi.rb (CGI::QueryExtension::MorphingBody): fix criteria to
  use Tempfile.  A fix from Zev Blut <rubyzbibd at ubit.com>.
  [ruby-core:06076]

* string.c: remove global functions work on $_.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-29 12:05:16 +00:00
matz f0b77b0cde * ext/tk/lib/tk.rb (TkCore::chooseDirectory): back up wrongly
removed method.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-26 15:03:16 +00:00
matz f595d5b0d2 * array.c (rb_ary_values_at): new method to replace select(index..).
* hash.c (rb_hash_values_at,env_values_at): ditto.

* re.c (match_values_at): ditto.

* struct.c (rb_struct_values_at): ditto.

* re.c (match_select): add iterator behavior.
	* ext/curses/curses.c, ext/digest/sha2/sha2.c, ext/iconv/iconv.c,
	  ext/racc/cparse/cparse.c: include "ruby.h" at the top to shut up
	  "_FILE_OFFSET_BITS redefined" warning on Solaris.

* class.c (rb_class_protected_instance_methods): now gives
  warnings to show migration path.  The default will be reversed
  on Jan 2004.

* numeric.c (num_step): "1.1.step(1.5,0.1)" to work.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-04 16:03:24 +00:00
knu 4e840877aa * ext/digest/sha2/sha2.c: Merge from rough. Fix a couple of
off-by-one errors in Aaron Gifford's code.

  Obtained from:  KAME via FreeBSD
  KAME PR:        393
  FreeBSD PR:     kern/34242


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-26 22:09:49 +00:00
knu 76d7dae26a Import the "digest" module and the submodules, from the Rough Ruby
project.

  ext/digest:
    This module provides the module Digest and the abstract class
    Digest::Base.

  ext/digest/md5 (which obsoletes ext/md5):
    This module provides the class Digest::MD5 which implements the
    MD5 Message-Digest Algorithm.

  ext/digest/rmd160:
    This module provides the class Digest::RMD160 which implements the
    RIPEMD-160 cryptographic hash function.

  ext/digest/sha1 (which obsoletes ext/sha1):
    This module provides the class Digest::SHA1 which implements the
    SHA-1 Secure Hash Algorithm.

  ext/digest/sha2:
    This module provides the classes Digest::SHA256, Digest::SHA384
    and Digest::SHA512 which implement the SHA-256, SHA-384 and
    SHA-512 Secure Hash Algorithms, respectively.

  lib/md5.rb, lib/sha1.rb:
    These files are provided for backward compatibility.

All these classes have the common API, which previously ext/md5 and
ext/sha1 modules provided.  While the new API keeps 100% backward
compatibility, it has been enriched with several utility methods.

Read digest.txt for further details.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-13 20:06:14 +00:00