Logo

Programming-Idioms

Assign to the string s the standard base64 encoding of the byte array data, as specified by RFC 4648.
Implementation
Scheme

Implementation edit is for fixing errors and enhancing with metadata. Please do not replace the code below with a different implementation.

Instead of changing the code of the snippet, consider creating another Scheme implementation.

Be concise.

Be useful.

All contributions dictatorially edited by webmasters to match personal tastes.

Please do not paste any copyright violating material.

Please try to avoid dependencies to third-party libraries and frameworks.

Other implementations
import "encoding/base64"
s := base64.StdEncoding.EncodeToString(data)
import base64
b = base64.b64encode(data)
s = b.decode()
require 'base64'
s = Base64.strict_encode64(data)
final s = data.encodeBase64().toString()
let s = base64::encode(data);
uses base64;
s := EncodeStringBase64(data);
let s = btoa(data);
using System;
string s = Convert.ToBase64String(data);
Imports System
Dim s As String = Convert.ToBase64String(data)
import 'dart:convert';
var s = base64.encode(data);
use MIME::Base64;
$encoded = encode_base64('Aladdin:open sesame');
$decoded = decode_base64($encoded);