planck

Planck ClojureScript REPL
2016-09-06T14:57:09.000023Z

@mfikes : I've been deep-diving into the crypto.subtle APIs lately, and I couldn't help but notice that planck doesn't seem to have crypto available.

2016-09-06T14:57:46.000024Z

Is this because the JS VM under the hood is just jsc?

mfikes 2016-09-06T14:58:08.000025Z

@xcthulhu No reason. Never been any interest in it I suppose.

2016-09-06T14:58:28.000026Z

Yeah, I sort of spend all my time writing polyfills around it TBH.

2016-09-06T15:01:19.000027Z

Down the road, as people want to do more and more with Planck, I think it would be a good idea to expose crypto.getRandomValues

mfikes 2016-09-06T15:02:05.000029Z

Yeah, if there’s interest, we could add some native support to Planck and surface it via some namespace. (It would have to be portable native code.)

2016-09-06T15:07:05.000030Z

It's a niche thing - it only comes up when you are trying to make a random private key or non-RFC 6979 compliant legacy signature schemes.

2016-09-06T15:08:01.000031Z

But I would recommend simply implementing js/window.crypto according to the spec - https://www.w3.org/TR/WebCryptoAPI/

2016-09-06T15:08:56.000032Z

One of the frustrating things about trying to do crypto with JS is that only FireFox and Chrome seem to follow this - IE, Safari, and Node.js all have other ideas.

2016-09-06T15:09:16.000033Z

</rant>