path: root/ext/digest/sha1
AgeCommit message (Collapse)Author
2006-10-20* ext/digest: Prefix C constants with RUBY_ and C type names withknu
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:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-13* ext/digest/digest.c, ext/digest/digest.h,knu
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:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-13* ext/digest/digest.c, ext/digest/md5/md5init.c,knu
ext/digest/rmd160/rmd160init.c, ext/digest/sha1/sha1init.c, ext/digest/sha2/sha2init.c: Add RDoc documentation. * ext/digest/digest.txt, ext/digest/digest.txt.ja: Removed in favor of embedded RDoc documentation. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-11* ext/digest/digest.c (get_digest_base_metadata): Use an instanceknu
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:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-11* ext/digest/digest.c (rb_digest_base_alloc,knu
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:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-11* ext/digest/sha1/sha1ossl.h: libssl 0.9.8c-3 defines nomatz
SHA_BLOCK_LENGTH. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-11* ext/digest/digest.c (rb_digest_base_reset, Init_digest): Addknu
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:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-10* ext/digest/sha1/depend, ext/digest/sha2/depend: Remove obsoleteknu
dependencies. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-05* ext/digest/digest.[ch]: Since the argument order ofknu
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:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-27* ext/digest/md5/md5init.c (Init_md5): Now that we have digest.rb,knu
require "digest" rather than "". * 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:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-07* ext/bigdecimal/bigdecimal.c, ext/digest/rmd160/rmd160ossl.c,matz
ext/digest/sha1/sha1ossl.c, ext/readline/readline.c: move incluion of config.h to pacify AIX. a patch from Yutaka Kanemoto <kinpoco at>. [ruby-dev:29197] git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-24add extconf.h to .cvsignore.akr
git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-05-25* ruby.h, lib/mkmf.rb (create_header): clear command line options fornobu
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:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-08-30* ext/digest/md5/md5ossl.h, ext/digest/rmd160/rmd160ossl.h,gotoyuzo
ext/digest/sha1/sha1ossl.h: include <stddef.h> to avoid error in compilation with OpenSSL-0.9.8. [ruby-list:41068] git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-01* MANIFEST, ext/**/MANIFEST: removed.eban
git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-17* array.c (rb_ary_delete): element comparison might change arraymatz
size. [ruby-dev:24273] * parse.y: make ruby parser reentrant. merge ripper parser to the real one. this change makes ruby require bison. * file.c (rb_file_truncate): clear stdio buffer before truncating the file. [ruby-dev:24191] * ext/digest/digest.c: use rb_obj_class() instead of CLASS_OF which might return singleton class. [ruby-dev:24202] git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-07* ext/extmk.rb: preserve order in Setup. [ruby-dev:22503]nobu
* ext/extmk.rb: move dependent libraries just after depended libraries. * ext/digest/*/extconf.rb: depend on digest. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-01* sample/optparse/opttest.rb: added.nobu
git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-06* ext/extmk.rb (extmake): pass LIBPATH to make ruby. [ruby-dev:21137]nobu
* ext/extmk.rb (extmake): set library name as source file name in Init_ext(). [ruby-dev:21137] * lib/mkmf.rb (Logging::postpone): postpone logging messages after heading message as the result of the block. * lib/mkmf.rb (macro_defined?): append newline to src unless ended with it. * lib/mkmf.rb (have_library): allow nil function name to just append a library. (ruby-bugs:PR#1083) * lib/mkmf.rb (pkg_config): should append additional libraries to $libs but not $LIBS. [ruby-dev:21137] * ext/io/wait/extconf.rb: check DOSISH macro instead of platform. * ext/digest/sha1/extconf.rb: have_library already appends library name. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-27Update the MANIFEST files.knu
git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-26* ext/digest/sha1: Use OpenSSL's SHA1 engine if available. It isknu
much faster than what we have now (sha1.[ch]). Add a knob (--with-bundled-sha1) to extconf.rb which makes it use the bundled one anyway. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-09-08* modify program_prefix only if specifiedeban
--program-prefix. * don't generate ext/extmk.rb. * execute directly $(srcdir)/ext/extmk.rb. remove -Cext option, "Dir::chdir 'ext'" in ext/extmk.rb. * {win32,bccwin32}/Makefile.sub: ditto. * instruby.rb: ditto. * ext/extmk.rb: renamed from ext/ * lib/mkmf.rb (module Logging): create log files (mkmf.log) in each extension module directories. * ext/extmk.rb: ditto. * lib/mkmf.rb (macro_defined?): new method. * ext/.cvsignore: remove extmk.rb. * ext/*/.cvsignore: add "*.def". git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-18* ext/digest: add depend file.nobu
* ext/digest/md5: ditto. * ext/digest/rmd160: ditto. * ext/digest/sha1: ditto. * ext/digest/sha2: ditto. * ext/iconv/MANIFEST: ditto. * ext/stringio/MANIFEST: ditto. * ext/syslog: ditto. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-24Merge from rough.knu
- Avoid namespace pollution. (MD5_* -> rb_Digest_MD5_*, etc.) git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-17* ext/digest/md5/md5init.c (Init_md5): rb_cvar_declare() isnobu
replaced by rb_cvar_set(). * 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:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-08-14* ext/digest/*/extconf.rb: really fix so that they build from anyknu
directory. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-14* ext/digest/*/extconf.rb: fix so that they build from anyknu
directory. git-svn-id: svn+ssh:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-13Import the "digest" module and the submodules, from the Rough Rubyknu
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:// b2dd03c8-39d4-4d8f-98ff-823fe69b080e