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/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
* 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
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
* 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
* 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
* 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
* 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
* 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: 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
* 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
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/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
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
* 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
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
in documentation examples. Patch by naleski via
https://github.com/ruby/ruby/pull/115
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e