Logo

Programming-Idioms

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

Idiom #235 Decode base64

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

import java.util.Base64;
byte[] data = Base64.getDecoder().decode(s);
using System;
byte[] bytes = Convert.FromBase64String(s);

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