Closed matiasdecarli closed 7 years ago
Sorry, can you rephrase your question? I am not sure what the goal is -- what is kDate.digest()
supposed to do? What is kDate?
The digest package really (really !!) is not for cypto or security. We have other packages in the R world for this. digest "merely" computes hash fingerprints. hmac()
is a contributed function.
Yes, sorry. According to the node
documentation, digest()
does the following
Calculates the HMAC digest of all of the data passed using hmac.update()
kDate
holds the value of createHmac
right now.
My ultimate goal is to obtain a signing key to use a web service
hmac()
was motivated for something loosely related -- if memory serves it was for a handshake with a db backend. But we have nothing ready-made or pre-cooked for you. You may have put a few pieces together by hand. I think your main problem right now is that you want node's crypto module, and you seem to assume that digest is supposed to deliver all of it. That is however not our purpose here.
Maybe have a look at the Web Technologies Task View; maybe it has something that can help you. I think I will close this issue though.
Ok, thanks @eddelbuettel for the help
I'm porting a piece of code from
nodejs
toR
Node:
R:
Which is OK, so far so good. The value matches, but then I need to do this in
node
Is there any easy way to implement this? Since
digest()
doesnt supportbase64
and exporting in other methods and converting tobase64
don't work eitherThanks in advance