diff options
Diffstat (limited to 'app/src/test/java/android/util')
-rw-r--r-- | app/src/test/java/android/util/Base64.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/app/src/test/java/android/util/Base64.java b/app/src/test/java/android/util/Base64.java new file mode 100644 index 00000000..da40e9c4 --- /dev/null +++ b/app/src/test/java/android/util/Base64.java @@ -0,0 +1,19 @@ +package android.util; + +import java.util.Arrays; + +public class Base64 { + + /** + * Base64-encode the given data and return a newly allocated + * String with the result. + * + * @param input the data to encode + * @param flags controls certain features of the encoded output. + * Passing {@code DEFAULT} results in output that + * adheres to RFC 2045. + */ + public static String encodeToString(byte[] input, int flags) { + return Arrays.toString(java.util.Base64.getEncoder().encode(input)); + } +} |