Skip to content

Keeping secrets with JavaScript – An Introduction to the WebCrypto API [video]

timtaubert.de
51 pointshumpt3 comments
On HN

Comments

A great talk. I had no idea you could create a prompt for the user to input their password that wouldn't be visible to Javascript (really cool!).

One thing that was really glossed over in the beginning was switching from an arbitrary data format to an ArrayBuffer. Is there are built-in way to do that operation or will we need to write our own conversion functions?

For non-binary data in general you would have to create your own serialization mechanism. For everything that can be represented textually you can however use the TextEncoder/Decoder API: "var buffer = new TextEncoder("utf-8").encode(text)".

Thanks for the response. What I wouldn't give for a built-in equivalent of python's pickle.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.