On 2 March 2018 at 10:43, Esteban A. Maringolo <emaring...@gmail.com> wrote:

> Hi Ben, all,
>
> So after all this what's the recommended way to use HMAC-SHA512 in Pharo 6?
>

Start poking around here...
https://github.com/Traadh/bittrex/blob/master/src/Bittrex.package/BittrexLibsodium.class/class/crypto_auth_hmacsha512__out.in.inlen.k..st
https://github.com/Traadh/bittrex/blob/master/src/Bittrex.package/BittrexPrivateAPI.class/instance/signRequest.st


Libsodium installation instructions...
https://github.com/Traadh/bittrex


I'd need it in combination with PBKDF2 to replicate this Python call:
> PBKDF2(password, salt, iterations, macmodule=hmac,
> digestmodule=hashlib.sha512).read(64)
>

I guess with iterations=1 you should get the same result as libsodium
I had to play around a bit before I worked out where to use bytes and where
to use hex strings.
It might help to run these test cases through PBKDF2...
https://github.com/Traadh/bittrex/tree/master/src/Bittrex.package/BittrexLibsodiumTest.class/instance


cheers -ben


>
> Regards,
>
> Esteban A. Maringolo
>
>
> 2017-12-10 6:01 GMT-03:00 Ben Coman <b...@openinworld.com>:
> > Can anyone recommend libraries (native Smalltalk or via FFI)
> > to do generate a HMAC-SHA512 ?
> >
> > cheers -ben
>
>

Reply via email to