Skip to content

Hashs & MAC chunk by chunk #9

@tex0l

Description

@tex0l

Hi!

Thank you for your amazing reactivity :)!

I was wondering if you were planning to expose a way to calculate MACs and hashes in multiple stages:

  • creation to set up the mac or hash object;
  • update to add the chunks to and update its internal state;
  • digest to finalize and return the mac or hash value.

We use it to calculate MACs of very large files without passing an ArrayBuffer of the file: https://github.com/seald/sscrypto/blob/c54c0fdb9f9cd4b311f031a9db1967bfd330b6f7/src/forge/aes.ts#L73

We can trick it for AES CBC without having to remember an internal state, but for hashes and MACs it is impossible (as far as I know).

Would you consider implementing such a feature? May we help on this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions