Closed ianopolous closed 3 years ago
Closing as a duplicate of #73.
@twiss That other issue is focused on encryption and decryption which do have non obvious questions. This issue is purely about hashing, which doesn't have those issues. It is worth separating out because this is a no brainer to implement with zero security considerations.
@ianopolous The other issue is about hashing as well, and has a concrete API proposal here: https://github.com/w3c/webcrypto/issues/73#issuecomment-455065709
At the moment we are limiting to hashing data that we can fit into RAM because webcrypto.subtle.digest doesn't have a streaming api. This would be trivial and safe to expose, and would allow hashing of arbitrary amounts of data in low RAM usage.
something like the following
allow window.crypto.subtle.digest to have only the first argument (the algorithm) and return an object with "update(data)" and "complete()" methods.