com.baidu.sapi2.account
类 AccountEncrypt

java.lang.Object
  继承者 com.baidu.sapi2.account.AccountEncrypt

public class AccountEncrypt
extends Object


构造方法摘要
AccountEncrypt()
           
 
方法摘要
static String AES128Decrypt(String content, String secretKey)
          decrypt the given content with the secretKey through the AES-128 algorithm
static String AES128Encrypt(String content, String secretKey)
          encrypt the given content with the secretKey through the AES-128 algorithm
static String decryptPassword(android.content.Context context, String password)
           
static String encryptPassword(android.content.Context context, String password)
           
static String getHexString(byte[] b)
          Convert byte[] to String
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

AccountEncrypt

public AccountEncrypt()
方法详细信息

encryptPassword

public static String encryptPassword(android.content.Context context,
                                     String password)

decryptPassword

public static String decryptPassword(android.content.Context context,
                                     String password)

AES128Encrypt

public static String AES128Encrypt(String content,
                                   String secretKey)
encrypt the given content with the secretKey through the AES-128 algorithm

参数:
content - the plain content wants to encrypt,the content encoding must be UTF-8
secretKey - the secret key ,the secretKey encoding must be UTF-8
返回:
the secret data encoded by base64

getHexString

public static String getHexString(byte[] b)
Convert byte[] to String

参数:
b - byte[] source
返回:

AES128Decrypt

public static String AES128Decrypt(String content,
                                   String secretKey)
decrypt the given content with the secretKey through the AES-128 algorithm

参数:
content - the plain content wants to encrypt,the content encoding must be UTF-8
secretKey - the secret key ,the secretKey encoding must be UTF-8
返回:
the secret data encoded by base64


Copyright © 2013. All Rights Reserved.