Re: [w3c/push-api] base64 (#280)

Hmm, well, base64url IS used a lot more, but it doesn't touch web APIs that often.  Though I wish we did have a generic encoder/decoder, we don't.

WebCrypto exposes it via JWK encode and decode, this API, and then I don't have a lot of examples.  Both of those examples are of the form where you want the binary data to serve some other end and the result of a variation is a promise rejection.  I very much doubt that you could get a "/" past either API.

You could expand the existing WPT tests for webcrypto or try to add some for push, I suppose.  But if you were looking for a primitive to test, I don't think that we're at the point of having one.

FWIW, one invariant that would be worth testing is whether string -> blah -> string returns equivalent strings.  It should here (unlike `atob()`, which is a mess).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/push-api/issues/280#issuecomment-323664431

Received on Monday, 21 August 2017 07:12:37 UTC