[erlang-questions] How to use crypto:hmac_init() and friends?

Viktor Söderqvist viktor@REDACTED
Fri Nov 20 11:31:37 CET 2015


On 2015-11-19 16.00, Sverker Eriksson wrote:
> Introducing a new data type in the language is quite a big operation
> though.
> 
> These empty magic binaries was sort of a last minute solution
> to give NIF designers some way to return "safe pointers" to Erlang.

Cool to learn that terms can have emulator state attached.

I think the magic could at least be documented. The documentation for
http://www.erlang.org/doc/man/crypto.html#hmac_init-2 just says the
context is a binary and doesn't mention anything about the emulator
state. That would be nice. I certainly would be confused if I ran into
this empty binary.

--
Viktor Söderqvist

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20151120/03fee8a6/attachment.bin>


More information about the erlang-questions mailing list