6 ms·
You can use ‘atob’ and ‘btoa’ functions for some of that.
by ash_gti 3y ago
You can use ‘atob’ and ‘btoa’ functions for some of that.
- denzquix 3y agoAlthough those functions operate on "binary strings", not Uint8Arrays, and there is no especially clean way that vanilla JS exposes to convert between the two that I am aware of.
- deleted 3y ago[deleted]
- esprehn 3y agoThose functions are fundamentally broken: https://developer.mozilla.org/en-US/docs/Glossary/Base64#javascript_support https://developer.mozilla.org/en-US/docs/Glossary/Base64#jav... See the whole section on converting arbitrary binary data and the complex ways to do it.