com.baidu.sapi2.security
类 EncryptHelper

java.lang.Object
  继承者 com.baidu.sapi2.security.EncryptHelper

public class EncryptHelper
extends Object

对所有接口(登陆、注册、补填用户名、注销等)中上行数据进行加密 先到pass请求证书,用RSA算法加密,其中包括一个随机生成的密钥, pass返回的数据是通过AES加密的,我们用这个随机生成的密要解密


构造方法摘要
EncryptHelper()
           
 
方法摘要
 String decrypt(String decText)
           
 String encrypt(String cert, String text)
           
 String getAESKey()
           
 void setAESKey(String key)
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

EncryptHelper

public EncryptHelper()
方法详细信息

encrypt

public String encrypt(String cert,
                      String text)
               throws CertificateException,
                      InvalidKeyException,
                      NoSuchAlgorithmException,
                      NoSuchPaddingException,
                      IllegalBlockSizeException,
                      BadPaddingException,
                      UnsupportedEncodingException
抛出:
CertificateException
InvalidKeyException
NoSuchAlgorithmException
NoSuchPaddingException
IllegalBlockSizeException
BadPaddingException
UnsupportedEncodingException

decrypt

public String decrypt(String decText)
               throws Exception
抛出:
Exception

getAESKey

public String getAESKey()

setAESKey

public void setAESKey(String key)


Copyright © 2013. All Rights Reserved.