Does JupyterLab have a dependency that we should use for generating hashes?

We need to generate a fast hash of a string. It looks like the JavaScript APIs are a little iffy (questionable support). I grepped the JupyterLab packages for “md5”, “sha1”, etc., but I didn’t find anything doing anything like that. Is there such a dependency that is already depended on by JupyterLab that I can import into my extension in order to generate fast hashes?

I don’t know of any that we are using in jlab off the top of my head.

1 Like

Have likewise needed these features on occasion. While it’s certainly worth a look around, WASM seems good for this use case:

While reusing a proven provider like sodium would also be attractive:

If we’re going to be doing anything at scale, seems like these would directions to look down. If we were doing more hashing stuff in the build side of things on node, i’d lean towards the sodium one, unless it’s not particularly well packaged (e.g. downloads binary blobs at install- or run- :scream: time)