public class TripleDES
extends java.lang.Object
encrypt(String) or decrypt(byte[]) decrypt(String) directly,you should use setToken(String) first.| 构造器和说明 | 
|---|
TripleDES()  | 
| 限定符和类型 | 方法和说明 | 
|---|---|
static byte[] | 
Base64decoding(java.lang.String context,
              int type)
Decode the Base64-encoded data in input and return the data in a new byte array. 
 | 
static byte[] | 
Base64decodingByte(byte[] context,
                  int type)
Decode the Base64-encoded data in input and return the data in a new byte array. 
 | 
static java.lang.String | 
Base64encoding(byte[] context,
              int type)
Base64-encode the given data and return a newly allocated String with the result. 
 | 
static byte[] | 
Base64encodingByte(byte[] context,
                  int type)
Base64-encode the given data and return a newly allocated byte[] with the result. 
 | 
protected static byte[] | 
copyOf(byte[] original,
      int newLength)  | 
static java.lang.String | 
decrypt(byte[] message)
Decrypt the message with TripleDES 
 | 
static java.lang.String | 
decrypt(java.lang.String message)
Decrypt the message with TripleDES 
 | 
static java.lang.String | 
encrypt(java.lang.String message)
Encrypt the message with TripleDES 
 | 
static int | 
getSdkVersion()
Return the user-visible SDK version of the framework 
 | 
static java.lang.String | 
getToken()  | 
static void | 
setToken(java.lang.String token)  | 
protected static byte[] copyOf(byte[] original,
            int newLength)
                        throws java.lang.NegativeArraySizeException
java.lang.NegativeArraySizeExceptionpublic static int getSdkVersion()
public static java.lang.String Base64encoding(byte[] context,
                              int type)
context - type - public static byte[] Base64encodingByte(byte[] context,
                        int type)
context - type - public static byte[] Base64decoding(java.lang.String context,
                    int type)
                             throws java.lang.IllegalArgumentException,
                                    java.io.IOException
context - type - java.lang.IllegalArgumentException - if the input contains incorrect paddingjava.io.IOExceptionpublic static byte[] Base64decodingByte(byte[] context,
                        int type)
                                 throws java.lang.Exception
context - type - java.lang.Exceptionpublic static java.lang.String encrypt(java.lang.String message)
                                throws java.lang.Exception
message - java.lang.Exceptionpublic static java.lang.String decrypt(byte[] message)
                                throws java.lang.Exception
message - java.lang.Exceptionpublic static java.lang.String decrypt(java.lang.String message)
                                throws java.lang.Exception
message - java.lang.Exceptionpublic static java.lang.String getToken()
public static void setToken(java.lang.String token)