hyphenate_SDK3.0  3.0.1
hyphenatejavaIMSDK
Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
com.hyphenate.util.CryptoUtils Class Reference

Public Member Functions

void init (int algorithm)
 
void initDES ()
 
void initAES ()
 
String encryptBase64String (String message) throws Exception
 
String decryptBase64String (String message) throws Exception
 
byte[] encrypt (String message) throws Exception
 
byte[] encrypt (byte[] input) throws Exception
 
byte[] decrypt (byte[] input) throws Exception
 

Static Public Member Functions

static String getHex (byte[] raw)
 

Static Public Attributes

static final int ALGORIGHM_DES = 0
 
static final int ALGORIGHM_AES = 1
 

Member Function Documentation

String com.hyphenate.util.CryptoUtils.encryptBase64String ( String  message) throws Exception

encrypt the message using 3DES or AES. notice, we need to use base64encoded on the encrypted bytes inorder to add this message to xml stream to send out once received, need to use base64decoded first to get the encrypted bytes the decrypt it and return the plain text

Parameters
message
Returns
Exceptions
Exception

The documentation for this class was generated from the following file: