Skip to content

Instantly share code, notes, and snippets.

@scizzr
scizzr / Base64.java
Last active December 18, 2015 00:19 — forked from EmilHernvall/Base64.java
public class Base64 {
private static final String tbl = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
public static byte[] encode(String string) {
return encode(string, false);
}
public static byte[] encode(byte[] data) {
return encode(data, false);
}