com.baidu.sapi2.account
类 AccountEncrypt
java.lang.Object
com.baidu.sapi2.account.AccountEncrypt
public class AccountEncrypt
- extends Object
从类 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-8secretKey
- 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-8secretKey
- the secret key ,the secretKey encoding must be UTF-8
- 返回:
- the secret data encoded by base64
Copyright © 2013. All Rights Reserved.