aboutsummaryrefslogtreecommitdiffstats
path: root/ext/digest/digest.c
Commit message (Collapse)AuthorAgeFilesLines
* digest.c: GC guardnobu2015-05-211-0/+3
| | | | | | | * ext/digest/digest.c (hexencode_str_new, rb_digest_base_update): prevent argument strings from GC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* allocate structs with wrappernobu2015-05-161-3/+2
| | | | | | | | | | | | | | * parse.y (rb_parser_new, ripper_s_allocate): allocate structs with making new wrapper objects and get rid of potential memory leak. * variable.c (rb_autoload): ditto. * ext/digest/digest.c (rb_digest_base_alloc): ditto. * ext/strscan/strscan.c (strscan_s_allocate): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use 0 for reservednobu2014-12-011-1/+1
| | | | | | | use 0 for rb_data_type_t::reserved instead of NULL, since its type may be changed in the future and possibly not a pointer type. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* digest: no check for hidden objectsnobu2014-09-291-0/+2
| | | | | | | * ext/digest/digest.c (get_digest_base_metadata): metadata objects are hidden from ruby level. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* digest.c: typed datanobu2014-09-271-6/+15
| | | | | | | | | * ext/digest/digest.c (rb_digest_base_alloc): use typed data. * ext/digest/digest.c (rb_digest_base_copy): fail unless original object has same algorithm. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* digest.c: raise exception on init failurenobu2014-07-151-4/+12
| | | | | | | | * ext/digest/digest.c: expect digest init and finish functions to indicate success or failure; raise exception on failure. [ruby-core:61614] [Bug #9659] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* digest.c: call to_s oncenobu2014-06-071-4/+3
| | | | | | | * ext/digest/digest.c (rb_digest_instance_equal): no need to call `to_s` twice. [Bug #9913] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* digest.c: fix #== for non-string argumentseregon2014-06-061-1/+3
| | | | | | | | * ext/digest/digest.c (rb_digest_instance_equal): fix #== for non-string arguments. [ruby-core:62967] [Bug #9913] * test/digest/test_digest.rb: add test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/*: [DOC] Fix several typos and broken http links.zzak2013-11-131-18/+35
| | | | | | | | | | | Improved examples for Digest overview and fixed a broken example in Digest::HMAC overview. This patch also adds a description of Digest::SHA256.bubblebabble to the Digest overview. Patched by @stomar [Bug #9027] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/digest.c: [DOC] typo in overview by @chastellzzak2013-09-261-2/+1
| | | | | | | [Fixes GH-399] https://github.com/ruby/ruby/pull/399 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/digest/digest.c (hexencode_str_new): return an ASCII stringeregon2012-08-011-1/+1
| | | | | | | * test/digest: tests for all kind of digests encodings [ruby-core:46792][Bug #6799] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (rb_enc_codepoint_len): Use UNREACHABLE to avoid "controldrbrain2012-04-131-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | reaches end of non-void function" warnings. [ruby-trunk - Bug #6066] * re.c (name_to_backref_number): ditto. * object.c (rb_Float): ditto. * io.c (io_readpartial): ditto. * io.c (io_read_nonblock): ditto. * pack.c (rb_uv_to_utf8): ditto. * proc.c (rb_method_entry_arity): ditto. * vm_method.c (rb_f_notimplement): ditto. * struct.c (rb_struct_aset_id): ditto. * class.c (rb_scan_args): ditto. * process.c (rlimit_resource_type): ditto. * process.c (rlimit_resource_value): ditto. * process.c (p_uid_switch): ditto. * process.c (p_gid_switch): ditto. * ext/digest/digest.c (rb_digest_instance_update): ditto. * ext/digest/digest.c (rb_digest_instance_finish): ditto. * ext/digest/digest.c (rb_digest_instance_reset): ditto. * ext/digest/digest.c (rb_digest_instance_block_length): ditto. * ext/bigdecimal/bigdecimal.c (BigDecimalCmp): ditto. * ext/dl/handle.c (rb_dlhandle_close): ditto. * ext/tk/tcltklib.c (pending_exception_check0): ditto. * ext/tk/tcltklib.c (pending_exception_check1): ditto. * ext/tk/tcltklib.c (ip_cancel_eval_core): ditto. * ext/tk/tcltklib.c (lib_get_reltype_name): ditto. * ext/tk/tcltklib.c (create_dummy_encoding_for_tk_core): ditto. * ext/tk/tkutil/tkutil.c (tk_hash_kv): ditto. * ext/openssl/ossl_ssl.c (ossl_ssl_session_reused): ditto. * ext/openssl/ossl_pkey_ec.c (ossl_ec_key_dsa_verify_asn1): ditto. * ext/openssl/ossl_pkey_ec.c (ossl_ec_point_is_at_infinit): ditto. * ext/openssl/ossl_pkey_ec.c (ossl_ec_point_is_on_curve): ditto. * ext/fiddle/conversions.c (generic_to_value): ditto. * ext/socket/raddrinfo.c (rsock_io_socket_addrinfo): ditto. * ext/socket/socket.c (sock_s_getnameinfo): ditto. * ext/ripper/eventids2.c (ripper_token2eventid): ditto. * cont.c (return_fiber): ditto. * dmydln.c (dln_load): ditto. * vm_insnhelper.c (vm_search_normal_superclass): ditto. * bignum.c (big_fdiv): ditto. * marshal.c (r_symlink): ditto. * marshal.c (r_symbol): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/digest.c: Add documentation for the Digest module. Patch bydrbrain2011-08-121-0/+47
| | | | | | | Sylvain Daubert. [Ruby 1.9 - Bug #5167] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * internal.h: add for internal use only.nobu2011-05-181-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/digest.c (rb_digest_class_init): Defineknu2010-10-181-0/+8
| | | | | | Digest::Class.new(). [Feature #3954] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/digest.c (rb_digest_instance_hexdigest_bang): Fixknu2010-01-171-2/+2
| | | | | | | | | | | rdoc. * ext/digest/lib/digest.rb (Digest::Class.base64digest) (Digest::Instance#base64digest{,!}): New methods. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/digest.c (rb_digest_instance_digest)knu2010-01-171-8/+2
| | | | | | | | | (rb_digest_instance_hexdigest): Save a method call of reset() for a disposable clone. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/digest.c (rb_digest_instance_method_unimpl): Suppressknu2009-12-311-2/+2
| | | | | | | | compiler warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/digest.c (rb_digest_instance_method_unimpl): Do notknu2009-11-251-4/+13
| | | | | | | | | call rb_inspect() on an object that does not implement necessary methods; reported by NaHi. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/bigdecimal/bigdecimal.c (VpMidRound): remove warnings.naruse2009-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | patch from Charlie Savage. [ruby-core:22869] * ext/digest/bubblebabble/bubblebabble.c (bubblebabble_str_new): ditto. * ext/digest/digest.c (hexencode_str_new): ditto. * ext/iconv/iconv.c (iconv_convert): ditto. * ext/socket/socket.c (inspect_sockaddr): ditto. * ext/socket/raddrinfo.c (sockaddr_obj): ditto. * ext/syck/emitter.c (syck_emitter_write): ditto. * ext/syck/emitter.c (syck_emitter_flush): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/digest.c (rb_digest_instance_inspect): constified.shyouhei2008-07-011-1/+1
| | | | | | | * variable.c (rb_path2class): field precision should have type int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c, bignum.c, cont.c, dir.c, dln.c, encoding.c, enumerator.c,ko12008-06-081-1/+1
| | | | | | | | | | | | | | | | | | | enumerator.c (enumerator_allocate), eval_jump.c, file.c, hash.c, io.c, load.c, pack.c, proc.c, random.c, re.c, ruby.c, st.c, string.c, thread.c, thread_pthread.c, time.c, util.c, variable.c, vm.c, gc.c: allocated memory objects by xmalloc (ruby_xmalloc) should be freed by xfree (ruby_xfree). * ext/curses/curses.c, ext/dbm/dbm.c, ext/digest/digest.c, ext/gdbm/gdbm.c, ext/json/ext/parser/parser.c, ext/json/ext/parser/unicode.c, ext/openssl/ossl_cipher.c, ext/openssl/ossl_hmac.c, ext/openssl/ossl_pkey_ec.c, ext/sdbm/init.c, ext/strscan/strscan.c, ext/zlib/zlib.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/intern.h: export rb_ivar_foreach.akr2007-09-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * include/ruby/ruby.h: modify struct RObject and RClass for optimizing T_OBJECT space. [ruby-dev:31853] (ROBJECT_LEN, ROBJECT_PTR) (RCLASS_IV_TBL, RCLASS_M_TBL, RCLASS_SUPER, RCLASS_IV_INDEX_TBL) (RMODULE_IV_TBL, RMODULE_M_TBL, RMODULE_SUPER): abstract accessor defined. * variable.c: support the modified RObject and RClass. * object.c: ditto. * class.c: ditto. * gc.c: ditto. * marshal.c: ditto. * eval_method.ci: use the abstract accessor. * insns.def: ditto. * proc.c: ditto. * struct.c: ditto. * eval.c: ditto. * error.c: ditto. * vm.c: ditto. * insnhelper.ci: ditto. * ext/digest/digest.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/cfunc.c (rb_dlcfunc_call): adjust format. [ruby-dev:31222]nobu2007-07-151-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ext/digest/digest.c (rb_digest_instance_update, rb_digest_instance_finish, rb_digest_instance_reset, rb_digest_instance_block_length): %s in rb_raise() expects char*. [ruby-dev:31222] * ext/openssl/ossl.h: include ossl_pkcs5.h. [ruby-dev:31231] * ext/openssl/ossl_pkcs5.h: new file for PKCS5. [ruby-dev:31231] * ext/openssl/ossl_x509name.c (ossl_x509name_to_s): use ossl_raise() instead of rb_raise(). [ruby-dev:31222] * ext/sdbm/_sdbm.c: DOSISH platforms need io.h. [ruby-dev:31232] * ext/syck/syck.h: include stdlib.h for malloc() and free(). [ruby-dev:31232] * ext/syck/syck.h (syck_parser_set_input_type): prototype added. [ruby-dev:31231] * win32/win32.c: include mbstring.h for _mbspbrk(). [ruby-dev:31232] * include/ruby/win32.h (rb_w32_getcwd): prototype added. [ruby-dev:31232] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* better error messageknu2007-02-281-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/digest.c (get_digest_base_metadata): Allow inheritingknu2007-02-281-4/+8
| | | | | | | | Digest::Base subclasses, which was unintentionally made impossible while restructuring Digest classes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/bigdecimal/bigdecimal.c (BigDecimal_load): Silence warningsknu2007-02-271-2/+2
| | | | | | | | | | | | | | | regarding char * vs. unsigned char * mismatch; submitted by Lyle Johnson <lyle.johnson@gmail.com> in [ruby-core:10416]. * ext/digest/sha1/sha1ossl.c (SHA1_Finish): Ditto. * ext/digest/rmd160/rmd160ossl.c (RMD160_Finish): Ditto. * ext/digest/digest.c (rb_digest_base_finish, rb_digest_base_update): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/lib/digest/hmac.rb (Digest::HMAC::update): Minorknu2006-11-011-4/+4
| | | | | | | | | | optimization. * ext/digest/digest.c (rb_digest_instance_equal): Allow comparing a digest instance with another of a different class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/digest.c (Init_digest): typo.usa2006-10-261-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest: Prefix C constants with RUBY_ and C type names withknu2006-10-201-324/+412
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/digest.c, ext/digest/digest.h,knu2006-10-131-2/+117
| | | | | | | | | | | | | | | | | | | | | 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
* * ext/digest/digest.c: Improve RDoc documentation further more.knu2006-10-131-2/+13
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/digest.c: Improve RDoc documentation.knu2006-10-131-16/+33
| | | | | | | | | | | | | | * ext/digest/digest.c (Init_digest, rb_digest_base_s_digest, rb_digest_base_s_hexdigest): Make Digest::Base::digest() and Digest::Base::hexdigest() take extra arguments, which are passed through to the constructor in an internal call. * ext/digest/bubblebabble/bubblebabble.c (rb_digest_base_s_bubblebabble): Ditto for Digest::Base::bubblebabble(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/digest.c (Init_digest): Digest::Base.new() does noknu2006-10-131-13/+0
| | | | | | | | | | | longer take an initial string to feed. This change allows subclasses to take hashing parameters. A statement such as ``md = Digest::MD5.new(s)'' can be easily rewritten as ``md = Digest::MD5.new << s'' or ``md = Digest::MD5.new.update(s)''. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/digest.c, ext/digest/md5/md5init.c,knu2006-10-131-19/+69
| | | | | | | | | | | 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://ci.ruby-lang.org/ruby/trunk@11153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/bubblebabble, ext/digest/digest.c: Rip BubbleBabbleknu2006-10-131-76/+0
| | | | | | | | support out of the base class and have a separate module named digest/bubblebabble. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/digest.c (rb_digest_base_equal): Again, should callknu2006-10-131-1/+1
| | | | | | | | digest() of a subclass instead of the one defined in the base class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/digest.c (rb_digest_base_equal): Should call digest()knu2006-10-121-2/+2
| | | | | | | of a subclass instead of the one defined in the base class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/digest.c (get_digest_base_metadata): Use an instanceknu2006-10-111-2/+2
| | | | | | | | | | | | | | | | | 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
* * ext/digest/digest.c (rb_digest_base_alloc,knu2006-10-111-18/+14
| | | | | | | | | | | | | 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
* * ext/digest/digest.c (rb_digest_base_reset): Do not makeknu2006-10-111-5/+9
| | | | | | | | recursive calls, but call initialize() when reset() is not defined in a subclass. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/digest.c (rb_digest_base_reset, Init_digest): Addknu2006-10-111-1/+25
| | | | | | | | | | | | | | | | | | | | | 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
* * ext/digest/digest.c (hexdigest_str_new, bubblebabble_str_new):knu2006-10-101-4/+12
| | | | | | | Perform StringValue() checks properly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/digest.c: Make hexdigest() always call digest() internally.knu2006-10-051-45/+72
| | | | | | | * ext/digest/digest.c: Add bubblebabble(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/digest.c: Allow subclassing in Ruby.knu2006-10-051-12/+82
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/digest.c (hexdigest_str_new): Add a string size check.knu2006-10-051-1/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/digest.[ch]: Since the argument order ofknu2006-10-051-21/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/digest.c (rb_digest_base_inspect): new method.akr2006-09-131-0/+22
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.h (struct RString): embed small strings.matz2006-08-311-9/+9
| | | | | | | | | | (RSTRING_LEN): defined for accessing string members. (RSTRING_PTR): ditto. * string.c: use RSTRING_LEN and RSTRING_PTR. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Make RDoc show up.drbrain2006-08-281-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e