Java
Chilkat2 Java
Example: Crypt2.DecodeString method
Demonstrates how to call the DecodeString method.Chilkat Java Downloads
import com.chilkatsoft.chilkat2.Crypt2;
public class ChilkatExample {
public static void main(String[] args) {
Crypt2 crypt2 = new Crypt2();
// The string "Hello World" in base64 (using the utf-8 byte representation) is "SGVsbG8gV29ybGQ="
String encodedStr = "SGVsbG8gV29ybGQ=";
String encoding = "base64";
String charset = "utf-8";
String str = crypt2.decodeString(encodedStr, charset, encoding);
System.out.println(str);
// Output is "Hello World"
}
}