digest-sha3-ruby icon indicating copy to clipboard operation
digest-sha3-ruby copied to clipboard

TypeError in Ruby 2.2.0 and later

Open brandt opened this issue 10 years ago • 9 comments

As of Ruby 2.2.0, digest-sha3 v1.0.2 now produces a TypeError. The problem also occurs in the current 2.3.0-dev build.

The problem doesn't occur in earlier versions of Ruby (verified: 1.9.3-p448, 2.0.0-p451, 2.1.2, 2.1.5).

Example:

2.2.0> require 'digest/sha3'
 => true
2.2.0> Digest::SHA3.digest("foo")
TypeError: wrong argument type Digest::SHA3 (expected digest)
    from (irb):2:in `reset'
    from (irb):2:in `digest'
    from (irb):2:in `digest'
    from (irb):2
    from /Users/bbuckley/.cache/rbenv/versions/2.2.0/bin/irb:11:in `<main>'

brandt avatar Feb 26 '15 20:02 brandt

:+1:

tmornini avatar Mar 03 '15 08:03 tmornini

+1

nesrual avatar Mar 30 '15 08:03 nesrual

+1

mikepollitt avatar Apr 11 '15 21:04 mikepollitt

I am no longer maintaining this gem. If someone would like to take over maintenance, please let me know.

FooBarWidget avatar Apr 13 '15 13:04 FooBarWidget

Trying to take up this torch here as we've been using this gem and moving to sha2 digests requires a massive change across a lot of affected systems. Anybody good with C extensions? I'm a bit baffled by the particular error as it seems to be coming from Digest itself and not this library.

bramski avatar May 20 '15 21:05 bramski

https://github.com/phusion/digest-sha3-ruby/pull/4 will fix this issue. New version of the gem requires 2.2.x.

@FooBarWidget if you can make me contributor. I can take some maintenance from here. Preferably we could make a PR and get this into ruby 2.3.0. I can ask Nobu if he'd like an implementation of sha3 in future versions of ruby.

bramski avatar May 21 '15 16:05 bramski

Poke

bramski avatar Jun 23 '15 22:06 bramski

My PR was merged. You can close this issue @brandt .

bramski avatar Jul 28 '15 01:07 bramski

Hurray! :+1:

tmornini avatar Jul 28 '15 19:07 tmornini