On Jan 24, 12:13 am, MohsinHijazee <mohsinhija... / gmail.com> wrote:
> Actually, I understand the terms involved. But the problem is that
> functions are not documented properly. The HMAC.digest should take two
> arguments, one should be the key and the second should be the message
> to be encrypted whereas its taking three arguments. In an IRB session,
> even the version with two arguments complains that its being provided
> with too many arguments. Anyone to clarify on this?
Yes, it's true that the documentation is lacking. Can you post the
code and error message you get when trying to use HMAC.digest in irb?
On two of my systems (one Linux, on WinXP), the arity of HMAC.digest
is three:
> OpenSSL::HMAC.method(:digest).arity
=> 3
and it will take three arguments, but I don't know how to use the
method so I can't be of much help. In the Ruby source, the three
arguments are named digest, key, and data.