aboutsummaryrefslogtreecommitdiffstats
path: root/ext/digest
Commit message (Collapse)AuthorAgeFilesLines
* Update dependencies.akr2016-04-116-0/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* handle ext/ as r53141naruse2015-12-169-0/+9
| | | | | | | | g -L frozen_string_literal ext/**/*.rb|xargs ruby -Ka -e'ARGV.each{|fn|puts fn;open(fn,"r+"){|f|s=f.read.sub(/\A(#!.*\n)?(#.*coding.*\n)?/,"\\&# frozen_string_literal: false\n");f.rewind;f.write s}}' git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fixup! r52695naruse2015-11-262-3/+4
| | | | | | | | | | OpenSSL's SHA1 struct name is SHA_CTX (which is also used for SHA-0), but function name is SHA1_Transform. http://openssl.org/docs/man0.9.8/crypto/SHA1.html also note that LibreSSL 2.3 remove the SHA-0 support but still support SHA-1. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/sha1/extconf.rb: OpenSSL's struct name for SHA1 isnaruse2015-11-211-1/+1
| | | | | | SHA_CTX. http://openssl.org/docs/man0.9.8/crypto/SHA1.html git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/*/*.[ch]: include ruby.h before digest.h to avoidnaruse2015-11-2114-18/+15
| | | | | | | | | | | | includeing ext/digest/extconf.h. [Bug #3231] https://msdn.microsoft.com/library/36k2cdd4.aspx * ext/digest/*/extconf.rb: remove ext/digest from include search path to avoid confusion of cl.exe. * ext/digest/*/*.[ch]: explicitly specify def.h's path. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 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
* * doc/contributors.rdoc: fix a typo. Patch by @davydovantonhsbt2015-04-151-1/+1
| | | | | | | | | | [fix GH-872][ci skip] * doc/syntax/methods.rdoc: ditto. * ext/digest/sha2/sha2.c: ditto. * ext/socket/ipsocket.c: ditto. * ext/tk/*: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50320 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* md5init.c: fix a typonobu2015-02-111-1/+1
| | | | | | | * ext/digest/md5/md5init.c: fix a typo, remove an extra underscore from a macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* digest: CommonDigestnobu2015-02-117-0/+72
| | | | | | | * ext/digest/digest_conf.rb (digest_conf): check for CommonDigest. * ext/digest/*/*cc.h: for Apple CommonCrypto/CommonDigest.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* digest: define Finish func from Final funcnobu2015-02-1110-47/+40
| | | | | | | * ext/digest/digest.h (DEFINE_FINISH_FUNC_FROM_FINAL): macro for finish functions, by inverting arguments order. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* digest: common configurationsnobu2015-02-118-44/+31
| | | | | | | * ext/digest/digest_conf.rb (digest_conf): extract common configurations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* digest: no ID cachenobu2015-02-104-7/+7
| | | | | | * ext/digest/*/*init.c: no need to cache interned IDs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update dependencies.akr2014-12-196-9/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48898 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
* Update dependency.akr2014-11-216-28/+47
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Mark auogenerated part.akr2014-11-156-0/+15
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * common.mk: Remove comments in Dependency lines.akr2014-11-156-89/+89
| | | | | | | | | | | | Notified by usa. * enc/depend: Ditto. * ext/**/depend: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * tool/update-deps: Extend to fix dependencies.akr2014-11-156-10/+90
| | | | | | | | | | | | * common.mk: Dependencies updated by tool/update-deps. * enc/depend: Ditto. * ext/**/depend: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Make Digest() thread-safe.knu2014-10-311-3/+21
| | | | | | | | | | | * ext/digest/lib/digest.rb (Digest()): This function should now be thread-safe. If you have a problem with regard to on-demand loading under a multi-threaded environment, preload "digest/*" modules on boot or use this method instead of directly referencing Digest::*. [Bug #9494] cf. https://github.com/aws/aws-sdk-ruby/issues/525 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* digest/*/extconf.rb: do not link openssl when using bundlednobu2014-10-054-21/+19
| | | | | | | | * 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
* rmd160/extconf.rb: fix function namenobu2014-10-051-1/+1
| | | | | | | * 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: hide metadata objects for internal usenobu2014-09-304-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* protoize no-arguments functionsnobu2014-09-305-6/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* digest: no check for hidden objectsnobu2014-09-294-0/+8
| | | | | | | * 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
* ruby.h: warn untyped Datanobu2014-09-281-0/+2
| | | | | | | | | | | * include/ruby/ruby.h (rb_data_object_alloc_warning): warn Data_Wrap_Struct and Data_Make_Struct only if RUBY_UNTYPED_DATA_WARNING is set to 1. * include/ruby/ruby.h (rb_data_object_get_warning): ditto for Data_Get_Struct. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47730 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
* Revert r46828nobu2014-07-152-25/+6
| | | | | | r46828 "md5ossl.c: indicate the result" caused segfaults. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* md5ossl.c: indicate the resultnobu2014-07-152-6/+25
| | | | | | | | * ext/digest/md5/md5ossl.c: use OpenSSL EVP API instead of MD5 API to perform MD5 hashes using OpenSSL in ext/digest. [ruby-core:61614] [Bug #9659] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/digest: return values of init and finalnobu2014-07-158-36/+48
| | | | | | | | * 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
* digest.c: raise exception on init failurenobu2014-07-152-7/+15
| | | | | | | | * 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::HMAC is finally removed as previously noticed. [fix GH-648]knu2014-07-011-130/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46635 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/lib/digest/hmac.rb: extracted inline tests into test dir.hsbt2014-05-311-172/+0
| | | | | | * test/digest/test_digest_hmac.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/bubblebabble/bubblebabble.c: Teach RDoc digest/bubblebabblezzak2013-11-211-14/+18
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/*: [DOC] Fix several typos and broken http links.zzak2013-11-133-21/+38
| | | | | | | | | | | 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
* Eliminate less-than-zero checks for unsigned variablesnobu2013-09-121-1/+1
| | | | | | | | | | | * ext/bigdecimal/bigdecimal.c, ext/digest/md5/md5.c, ext/json/fbuffer/fbuffer.h, ext/json/generator/generator.c: Eliminate less-than-zero checks for unsigned variables. According to section 4.1.5 of C89 standard, size_t is an unsigned type. These checks were found with 'cppcheck' static analysis tool. [ruby-core:57117] [Feature #8890] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/lib/digest.rb (Digest::Class.file): Take optionalknu2013-05-211-2/+4
| | | | | | | arguments that are passed to the constructor of the digest class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/mkmf.rb: Add ruby/ruby.h, ruby/missing.h, ruby/intern.h,akr2013-04-136-27/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ruby/st.h and ruby/subst.h for ruby_headers in generated Makefile. * ext/-test-/old_thread_select/depend: Update dependencies. * ext/-test-/wait_for_single_fd/depend: Ditto. * ext/bigdecimal/depend: Ditto. * ext/curses/depend: Ditto. * ext/digest/bubblebabble/depend: Ditto. * ext/digest/depend: Ditto. * ext/digest/md5/depend: Ditto. * ext/digest/rmd160/depend: Ditto. * ext/digest/sha1/depend: Ditto. * ext/digest/sha2/depend: Ditto. * ext/dl/callback/depend: Ditto. * ext/dl/depend: Ditto. * ext/etc/depend: Ditto. * ext/nkf/depend: Ditto. * ext/objspace/depend: Ditto. * ext/pty/depend: Ditto. * ext/readline/depend: Ditto. * ext/ripper/depend: Ditto. * ext/sdbm/depend: Ditto. * ext/socket/depend: Ditto. * ext/stringio/depend: Ditto. * ext/strscan/depend: Ditto. * ext/syslog/depend: Ditto. * ext/-test-/num2int/depend: Removed. * ext/dbm/depend: Ditto. * ext/fcntl/depend: Ditto. * ext/gdbm/depend: Ditto. * ext/racc/cparse/depend: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* sha2.c: suppress warningsnobu2013-04-011-3/+6
| | | | | | | * ext/digest/sha2/sha2.c (SHA256_Final, SHA512_Last): suppress strict-aliasing warnings on gcc 4.8. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* extconf.rb: git rid of post-1.8 featurenobu2012-11-274-4/+8
| | | | | | | | | * ext/digest/*/extconf.rb, ext/openssl/extconf.rb: get git rid of post-1.8 feature require_relative for cross compilation. [ruby-core:50160] [Bug #7439] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37878 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
* rmd160.c: fix for huge datanobu2012-05-071-3/+7
| | | | | | | * ext/digest/rmd160/rmd160.c (RMD160_Update): fix for huge data. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * revert r35510 and r35511 which caused removing the headers everytime.nobu2012-05-014-8/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* depends on ext/openssl/deprecation.rbnobu2012-05-014-0/+8
| | | | | | * ext/digest/*/depend: depends on ext/openssl/deprecation.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/sha2/sha2.c (REVERSE32): exlicitly cast since unsignednobu2012-04-301-7/+7
| | | | | | | | | long may be larger than sha2_word32. * ext/digest/sha2/sha2.c (SHA{256,512,384}_{Final,End}): should clear whole content, not pointer size. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/*/extconf.rb: use pkg_config to use same library withnobu2012-04-304-16/+12
| | | | | | | | openssl. [ruby-core:44755][Bug #6379] * ext/openssl/deprecation.rb: extract check for broken Apple OpenSSL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35504 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