This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Maybe use TextEncoder: https://encoding.spec.whatwg.org/#interface-textencoder
Created attachment 1598 [details] Utility functions for converting text, base64, arrayBuffer These have consistently worked for any UTF-8 I've thrown at them for use with the web crypto API's
Comment on attachment 1598 [details] Utility functions for converting text, base64, arrayBuffer There are a few typos in the last two functions. Should be obvious, just remove the underscores. Sorry for that and for possibly not submitting this correctly -- first time on here.
(In reply to Adam Hart from comment #1) > Created attachment 1598 [details] > Utility functions for converting text, base64, arrayBuffer Converting string->base64 and then base64->abv (or the other way around) is not something we should suggest doing. TextEncoder, as mentioned by Martin above, is an API made for exactly that. I've used it for all my examples so far and I think we should use it here too.
Moved to https://github.com/w3c/webcrypto/issues/81