Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • Go

Idiom #235 Decode base64

Assign to byte array data the bytes represented by the base64 string s, as specified by RFC 4648.

import "encoding/base64"
data, err := base64.StdEncoding.DecodeString(s)
using System;
byte[] bytes = Convert.FromBase64String(s);

New implementation...
< >
programming-idioms.org