mirage / digestif

Simple hash algorithms in OCaml

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feed a hmac

reynir opened this issue · comments

It could be useful to be able to feed a hmac in a similar way to how a digest is fed. This allows computing a hmac over data that can't fit in memory at once. I can probably suggest a change.

Actually, hmac is just an other way to initialise the ctx (which can be used to feed_*).

PS: We probably can expose something like: val with_key : key -> ctx

I later found the hmaci_* functions which would fit my current needs. Indeed, a val with_key : key -> ctx (or hmac_ctx if needed) would be nice to have.

Let's open this PR and see if someone else is interesting by such value.