Add SHA3?
Would you be ok with a PR adding SHA3? I'd integrate the code here:
https://github.com/mjosaarinen/tiny_sha3
which is MIT-licensed. The C code is a single, short file and has the init/update/finalize API that all Digests seem to use.
There are two existing rubygems which provide SHA3 but the C code is more complex.
https://github.com/phusion/digest-sha3-ruby https://github.com/johanns/sha3
See also #10
tiny_sha3 seems not portable.
This looks assuming gcc only.
#if __BYTE_ORDER__ != __ORDER_LITTLE_ENDIAN__
Be careful with naming. What some people call SHA3 is actually a draft version of it, now known as Keccak. It's what Ethereum uses AFAIR. Final SHA3 is different. Maybe they both may be implemented under their proper names.
There is my fork of SHA3 by Phusion, properly renamed to Keccak and fixed for Ruby 3.4: https://github.com/kotovalexarian/digest-keccak