Signal-Android/src/org/thoughtcrime/securesms/util/Base64.java

20 lines
439 B
Java
Raw Normal View History

2014-11-12 11:15:05 -08:00
package org.thoughtcrime.securesms.util;
2011-12-20 10:20:44 -08:00
2019-10-31 11:59:37 -04:00
import androidx.annotation.NonNull;
2011-12-20 10:20:44 -08:00
2019-10-31 11:59:37 -04:00
import java.io.IOException;
2011-12-20 10:20:44 -08:00
2019-10-31 11:59:37 -04:00
public final class Base64 {
2011-12-20 10:20:44 -08:00
2019-10-31 11:59:37 -04:00
private Base64() {
}
2011-12-20 10:20:44 -08:00
2019-10-31 11:59:37 -04:00
public static @NonNull byte[] decode(@NonNull String s) throws IOException {
return org.whispersystems.util.Base64.decode(s);
}
2011-12-20 10:20:44 -08:00
2019-10-31 11:59:37 -04:00
public static @NonNull String encodeBytes(@NonNull byte[] source) {
return org.whispersystems.util.Base64.encodeBytes(source);
}
}