digest 3.1.0 → 3.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7207f387ca787774225cd9df57fae5c62761095cbe5976d3b0e92844ce700add
4
- data.tar.gz: 7c5bdbbac47aa05a44bc9bc37a4519a4eb7c062dfc781dd8b4c6b567a6596aa1
3
+ metadata.gz: 987de45a2894fa80f0d6ff23f3a70a7e813b9529b5ef4130b22be5e4c2f78020
4
+ data.tar.gz: 7241f2a350845b1478666dfbb0d6662a1b61e41a16e7504b064dd6eca6e3c0b2
5
5
  SHA512:
6
- metadata.gz: b589e6eb9462f1e9572ba5186840437f85bf6c5c7a12665ef3b6b6d0848a2e372f1df9b228a49b6e5321ca280353cf5de652ad5404af5cc200c4fe301ce37760
7
- data.tar.gz: 40f9583406b3f58ff6f22c8af4a2a414db6753b472201d22471eca5df1c16ca5563ca56700357a3165250505697a9fa58e6f73da7c0baf8ea56a5e12589aff3e
6
+ metadata.gz: b1f322b8fed96de4cde9b2b8cd2997f99a80998b5b671924cb6f3e3b6b28215c95021f2919ef8a5176823639e56ddb3cd05e2a154c59d9945f4770138ae4d941
7
+ data.tar.gz: f2a9f6d45f28fe9be2d140d9f99147669f9a0ab32fbeac724254eca036a89a364f222beac6eb3b38def4f395f961dc646a7780344e7eb13eff0759a39b7c6ce7
@@ -37,7 +37,7 @@ bubblebabble_str_new(VALUE str_digest)
37
37
  digest_len = RSTRING_LEN(str_digest);
38
38
 
39
39
  if ((LONG_MAX - 2) / 3 < (digest_len | 1)) {
40
- rb_raise(rb_eRuntimeError, "digest string too long");
40
+ rb_raise(rb_eRuntimeError, "digest string too long");
41
41
  }
42
42
 
43
43
  str = rb_str_new(0, (digest_len | 1) * 3 + 2);
data/ext/digest/digest.c CHANGED
@@ -154,7 +154,7 @@ static void
154
154
  rb_digest_instance_method_unimpl(VALUE self, const char *method)
155
155
  {
156
156
  rb_raise(rb_eRuntimeError, "%s does not implement %s()",
157
- rb_obj_classname(self), method);
157
+ rb_obj_classname(self), method);
158
158
  }
159
159
 
160
160
  /*
@@ -383,8 +383,8 @@ rb_digest_instance_equal(VALUE self, VALUE other)
383
383
  StringValue(str2);
384
384
 
385
385
  if (RSTRING_LEN(str1) == RSTRING_LEN(str2) &&
386
- rb_str_cmp(str1, str2) == 0) {
387
- return Qtrue;
386
+ rb_str_cmp(str1, str2) == 0) {
387
+ return Qtrue;
388
388
  }
389
389
  return Qfalse;
390
390
  }
@@ -602,7 +602,7 @@ static inline void
602
602
  algo_init(const rb_digest_metadata_t *algo, void *pctx)
603
603
  {
604
604
  if (algo->init_func(pctx) != 1) {
605
- rb_raise(rb_eRuntimeError, "Digest initialization failed.");
605
+ rb_raise(rb_eRuntimeError, "Digest initialization failed.");
606
606
  }
607
607
  }
608
608
 
@@ -614,7 +614,7 @@ rb_digest_base_alloc(VALUE klass)
614
614
  void *pctx;
615
615
 
616
616
  if (klass == rb_cDigest_Base) {
617
- rb_raise(rb_eNotImpError, "Digest::Base is an abstract class");
617
+ rb_raise(rb_eNotImpError, "Digest::Base is an abstract class");
618
618
  }
619
619
 
620
620
  algo = get_digest_base_metadata(klass);
@@ -639,7 +639,7 @@ rb_digest_base_copy(VALUE copy, VALUE obj)
639
639
 
640
640
  algo = get_digest_obj_metadata(copy);
641
641
  if (algo != get_digest_obj_metadata(obj))
642
- rb_raise(rb_eTypeError, "different algorithms");
642
+ rb_raise(rb_eTypeError, "different algorithms");
643
643
 
644
644
  TypedData_Get_Struct(obj, void, &digest_type, pctx1);
645
645
  TypedData_Get_Struct(copy, void, &digest_type, pctx2);
data/ext/digest/digest.h CHANGED
@@ -38,7 +38,7 @@ rb_digest_##name##_update(void *ctx, unsigned char *ptr, size_t size) \
38
38
  const unsigned int stride = 16384; \
39
39
  \
40
40
  for (; size > stride; size -= stride, ptr += stride) { \
41
- name##_Update(ctx, ptr, stride); \
41
+ name##_Update(ctx, ptr, stride); \
42
42
  } \
43
43
  if (size > 0) name##_Update(ctx, ptr, size); \
44
44
  }
@@ -3,7 +3,7 @@
3
3
  def digest_conf(name)
4
4
  unless with_config("bundled-#{name}")
5
5
  cc = with_config("common-digest")
6
- if cc == true or /\b#{name}\b/ =~ cc
6
+ if cc != false or /\b#{name}\b/ =~ cc
7
7
  if File.exist?("#$srcdir/#{name}cc.h") and
8
8
  have_header("CommonCrypto/CommonDigest.h")
9
9
  $defs << "-D#{name.upcase}_USE_COMMONDIGEST"
@@ -128,7 +128,7 @@ typedef u_int64_t sha2_word64; /* Exactly 8 bytes */
128
128
  #define SHA512_SHORT_BLOCK_LENGTH (SHA512_BLOCK_LENGTH - 16)
129
129
 
130
130
 
131
- #if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || defined(__GNUC__) || defined(_HPUX_SOURCE) || defined(__IBMC__)
131
+ #if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || defined(__GNUC__) || defined(__IBMC__)
132
132
  #define ULL(number) number##ULL
133
133
  #else
134
134
  #define ULL(number) (uint64_t)(number)
@@ -47,7 +47,7 @@ Init_sha2(void)
47
47
  cDigest_SHA##bitlen = rb_define_class_under(mDigest, "SHA" #bitlen, cDigest_Base); \
48
48
  \
49
49
  rb_ivar_set(cDigest_SHA##bitlen, id_metadata, \
50
- rb_digest_make_metadata(&sha##bitlen));
50
+ rb_digest_make_metadata(&sha##bitlen));
51
51
 
52
52
  FOREACH_BITLEN(DEFINE_ALGO_CLASS)
53
53
  }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Digest
4
- VERSION = "3.1.0"
4
+ VERSION = "3.1.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: digest
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akinori MUSHA
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-12-24 00:00:00.000000000 Z
11
+ date: 2022-12-05 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Provides a framework for message digest libraries.
14
14
  email:
@@ -78,7 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
78
78
  - !ruby/object:Gem::Version
79
79
  version: '0'
80
80
  requirements: []
81
- rubygems_version: 3.2.32
81
+ rubygems_version: 3.4.0.dev
82
82
  signing_key:
83
83
  specification_version: 4
84
84
  summary: Provides a framework for message digest libraries.