Example usage for android.util Base64 DEFAULT

List of usage examples for android.util Base64 DEFAULT

Introduction

In this page you can find the example usage for android.util Base64 DEFAULT.

Prototype

int DEFAULT

To view the source code for android.util Base64 DEFAULT.

Click Source Link

Document

Default values for encoder/decoder flags.

Usage

From source file:Main.java

public static String encrypt(String str) {
    return new String(Base64.encode(str.getBytes(), Base64.DEFAULT));
}

From source file:Main.java

public static String decode(String encodeStr) {
    return new String(Base64.decode(encodeStr, Base64.DEFAULT));
}

From source file:Main.java

public static String getBASE64(String s) {
    return new String(Base64.encode(s.getBytes(), Base64.DEFAULT));
}

From source file:Main.java

public static String encodeToString(String str) {
    return Base64.encodeToString(str.getBytes(), Base64.DEFAULT);
}

From source file:Main.java

public static String encode(String content) {
    return Base64.encodeToString(content.getBytes(), Base64.DEFAULT);
}

From source file:Main.java

public static String encData(String data) {
    String e = Base64.encodeToString(data.getBytes(), Base64.DEFAULT);
    return e.substring(0, 2) + "JX" + e.substring(2);
}

From source file:Main.java

public static String enToStr(String str) {
    String enStr = Base64.encodeToString(str.getBytes(), Base64.DEFAULT);
    return enStr;
}

From source file:Main.java

public static String convertBytesToString(byte[] p_byte) {
    return Base64.encodeToString(p_byte, Base64.DEFAULT);
}

From source file:Main.java

public static String encode(byte[] bytes) throws Exception {
    return Base64.encodeToString(bytes, Base64.DEFAULT);
}

From source file:Main.java

public static byte[] decode(String base64Str) throws Exception {
    return Base64.decode(base64Str, Base64.DEFAULT);
}