When running with ffi-1.2 the following warning is produced.
[DEPRECATION] Struct layout is already defined for class RbNaCl::HMAC::State. Redefinition as in /bundle/ruby/2.5.0/gems/rbnacl-7.1.0/lib/rbnacl/hmac/sha512256.rb:103:in `<class:State>' will be disallowed in ffi-2.0.
It seems these three files each define a RbNaCl::HMAC::State class.
The proposal presented here, nests the classes inside the main class of the file. Hence, three separate classes RbNaCl::HMAC::SHA256::State, RbNaCl::HMAC::SHA512::State, and RbNaCl::HMAC::SHA512256::State are defined instead.
When running with ffi-1.2 the following warning is produced.
It seems these three files each define a
RbNaCl::HMAC::State
class.The proposal presented here, nests the classes inside the main class of the file. Hence, three separate classes
RbNaCl::HMAC::SHA256::State
,RbNaCl::HMAC::SHA512::State
, andRbNaCl::HMAC::SHA512256::State
are defined instead.Fixes #205