keccak 1.3.1 → 1.3.2

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: 10fb878fcf308cc1a44942ef197956f830f0d91cc6c258acb8f5913ef6d270ce
4
- data.tar.gz: 359c30bf2d466a0d95d714ea82b4281812788e999607bafe917daf7a7b710919
3
+ metadata.gz: a5c574f148f558f9bc6f01b3a0ea3c38e4213b19b69346b0e49571c89c1ccc36
4
+ data.tar.gz: c47c1b7a7f663eb8960b2acda4ab82bc785df5f06d96f5517e34441359784021
5
5
  SHA512:
6
- metadata.gz: 95a226c317396f99e6fa1fdb15313dac072da683c5aa1345e7a609e7f283081adccf5e60bff0723e99a903a8564fb303c37a5ac9062eac26a14268394119cbd0
7
- data.tar.gz: 5ea35b0f285d115dd8226920dacd21a0a51dcb02d6d08aff16985a9a567c85ee397183678bbc26097b36f3242b0d1745c5d081bebbaa4a76efbe9ee0dc4574a4
6
+ metadata.gz: efe9aaf1f04ffbbfa4447398ba5a07959c15aeb02db32fbde8aefabd65a54fc0262cc6bf8582395247a161d26f303fa3f84568f376f8c63acc8f1aa0509724af
7
+ data.tar.gz: 13c0f0531aa58233b42daeb5afeb9e37039c1ac0b16abb4e58a952f9f0550474c183258d070050951bfba26d2fcb110b94596a609b2d34e756b36650b7dc67d5
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # The Keccak (SHA3) digest for Ruby
2
2
 
3
- [![GitHub Workflow Status](https://img.shields.io/github/workflow/status/q9f/keccak.rb/Build/main)](https://github.com/q9f/keccak.rb/actions)
3
+ [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/q9f/keccak.rb/build.yml?branch=main)](https://github.com/q9f/keccak.rb/actions)
4
4
  [![GitHub top language](https://img.shields.io/github/languages/top/q9f/keccak.rb?color=black)](https://github.com/q9f/keccak.rb/pulse)
5
5
  [![GitHub release](https://img.shields.io/github/v/release/q9f/keccak.rb)](https://github.com/q9f/keccak.rb/releases/latest)
6
6
  [![Gem](https://img.shields.io/gem/v/keccak?color=red)](https://rubygems.org/gems/keccak)
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env ruby
2
2
  # frozen_string_literal: true
3
3
 
4
- require 'mkmf'
4
+ require "mkmf"
5
5
 
6
6
  def cflags(*args)
7
7
  args.each do |str|
8
- $CFLAGS += (ENV['OS'] == "Windows_NT") ? " #{str} " : " #{str.shellescape} "
8
+ $CFLAGS += (ENV["OS"] == "Windows_NT") ? " #{str} " : " #{str.shellescape} "
9
9
  end
10
10
  end
11
11
 
@@ -17,15 +17,16 @@ def have_func!(header, *args)
17
17
  exit 1 unless have_func(*args, header)
18
18
  end
19
19
 
20
- cflags '-std=c11'
21
- cflags '-Wall'
22
- cflags '-Wextra'
23
- cflags '-fvisibility=hidden'
20
+ cflags "-std=c11"
21
+ cflags "-Wall"
22
+ cflags "-Wextra"
23
+ cflags "-fvisibility=hidden"
24
24
 
25
- have_header! 'ruby/digest.h'
26
- have_header! 'stdio.h'
27
- have_header! 'string.h'
25
+ have_header! "ruby/digest.h"
26
+ have_header! "stdio.h"
27
+ have_header! "string.h"
28
28
 
29
- have_func! 'rb_str_set_len'
29
+ have_func! "rb_str_set_len"
30
+ have_func "rb_digest_make_metadata", "ruby/digest.h"
30
31
 
31
- create_makefile 'digest/keccak' or exit 1
32
+ create_makefile "digest/keccak" or exit 1
data/ext/digest/keccak.c CHANGED
@@ -144,7 +144,11 @@ Init_keccak() {
144
144
 
145
145
  cKeccak = rb_define_class_under(mDigest, "Keccak", cDigest_Base);
146
146
 
147
+ #ifdef HAVE_RB_DIGEST_MAKE_METADATA
148
+ rb_iv_set(cKeccak, "metadata", rb_digest_make_metadata(&keccak));
149
+ #else
147
150
  rb_iv_set(cKeccak, "metadata", Data_Wrap_Struct(0, 0, 0, (void *)&keccak));
151
+ #endif
148
152
 
149
153
  rb_define_method(cKeccak, "initialize", rb_keccak_initialize, -1);
150
154
  rb_define_method(cKeccak, "digest_length", rb_keccak_digest_length, 0);
data/keccak.gemspec CHANGED
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- lib = File.expand_path('lib', __dir__).freeze
3
+ lib = File.expand_path("lib", __dir__).freeze
4
4
  $LOAD_PATH.unshift lib unless $LOAD_PATH.include? lib
5
5
 
6
- require 'digest/keccak/version'
6
+ require "digest/keccak/version"
7
7
 
8
8
  Gem::Specification.new do |spec|
9
9
  spec.name = "keccak"
@@ -15,15 +15,15 @@ Gem::Specification.new do |spec|
15
15
  spec.email = "%w[ruby@q9f.cc]"
16
16
  spec.extensions << "ext/digest/extconf.rb"
17
17
  spec.platform = Gem::Platform::RUBY
18
- spec.required_ruby_version = ">= 2.2", "< 4.0"
18
+ spec.required_ruby_version = ">= 3.0", "< 4.0"
19
19
  spec.license = "Apache-2.0"
20
20
  spec.metadata = {
21
- 'homepage_uri' => 'https://github.com/q9f/keccak.rb',
22
- 'source_code_uri' => 'https://github.com/q9f/keccak.rb',
23
- 'github_repo' => 'https://github.com/q9f/keccak.rb',
24
- 'bug_tracker_uri' => 'https://github.com/q9f/keccak.rb/issues',
21
+ "homepage_uri" => "https://github.com/q9f/keccak.rb",
22
+ "source_code_uri" => "https://github.com/q9f/keccak.rb",
23
+ "github_repo" => "https://github.com/q9f/keccak.rb",
24
+ "bug_tracker_uri" => "https://github.com/q9f/keccak.rb/issues",
25
25
  }.freeze
26
- spec.require_paths = ['lib']
26
+ spec.require_paths = ["lib"]
27
27
  spec.files = Dir[
28
28
  "README.md",
29
29
  "COPYRIGHT",
@@ -34,6 +34,6 @@ Gem::Specification.new do |spec|
34
34
  "lib/**/*"
35
35
  ]
36
36
  spec.test_files = spec.files.grep %r{^(test|spec|features)/}
37
- spec.add_development_dependency 'bundler', '~> 2.2'
38
- spec.add_development_dependency 'test-unit', '~> 3.4'
37
+ spec.add_development_dependency "bundler", "~> 2.4"
38
+ spec.add_development_dependency "test-unit", "~> 3.6"
39
39
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Digest
4
4
  class Keccak
5
- VERSION = "1.3.1"
5
+ VERSION = "1.3.2"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: keccak
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Afri Schoedon
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2022-08-23 00:00:00.000000000 Z
15
+ date: 2024-12-29 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: bundler
@@ -20,28 +20,28 @@ dependencies:
20
20
  requirements:
21
21
  - - "~>"
22
22
  - !ruby/object:Gem::Version
23
- version: '2.2'
23
+ version: '2.4'
24
24
  type: :development
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
27
27
  requirements:
28
28
  - - "~>"
29
29
  - !ruby/object:Gem::Version
30
- version: '2.2'
30
+ version: '2.4'
31
31
  - !ruby/object:Gem::Dependency
32
32
  name: test-unit
33
33
  requirement: !ruby/object:Gem::Requirement
34
34
  requirements:
35
35
  - - "~>"
36
36
  - !ruby/object:Gem::Version
37
- version: '3.4'
37
+ version: '3.6'
38
38
  type: :development
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
41
41
  requirements:
42
42
  - - "~>"
43
43
  - !ruby/object:Gem::Version
44
- version: '3.4'
44
+ version: '3.6'
45
45
  description: The Keccak (SHA3) hash used by Ethereum. This does not implement the
46
46
  final FIPS202 standard, today known as SHA3 but rather an early version, commonly
47
47
  referred to as Keccak.
@@ -84,7 +84,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
84
84
  requirements:
85
85
  - - ">="
86
86
  - !ruby/object:Gem::Version
87
- version: '2.2'
87
+ version: '3.0'
88
88
  - - "<"
89
89
  - !ruby/object:Gem::Version
90
90
  version: '4.0'
@@ -94,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
94
  - !ruby/object:Gem::Version
95
95
  version: '0'
96
96
  requirements: []
97
- rubygems_version: 3.2.32
97
+ rubygems_version: 3.5.16
98
98
  signing_key:
99
99
  specification_version: 4
100
100
  summary: The Keccak (SHA3) hash used by Ethereum.