btoa

external fun btoa(value: String): String

Encodes a base-64 encoded ASCII string from a "string" of binary data ("btoa" should be read as "binary to ASCII").

See https://developer.mozilla.org/en-US/docs/Glossary/Base64