com.pax.dal
Interface IP2PE
-
public interface IP2PE
端到端加密模块。Point-to-Point Encryption module.- Since:
- V3.22.00
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description voidtaDestroyContext(int keyIndex)结束Trans-Armor加密。End Trans-Armor encryption.TAEncryptedResulttaEncryptData(int keyIndex, byte[] plainData)用RSA公钥对明文账号数据和商户ID进行加密。Use the RSA public key to encrypt the plaintext account data and merchant ID.voidtaInitContext(int keyIndex, byte[] pubKey, java.lang.String merchantID)Trans-Armor加密初始化。Trans-Armor encryption initialization.
-
-
-
Method Detail
-
taInitContext
void taInitContext(int keyIndex, byte[] pubKey, java.lang.String merchantID) throws P2PEException
Trans-Armor加密初始化。Trans-Armor encryption initialization.- Parameters:
keyIndex-RSA公钥索引。范围:1~10。RSA public key index. Range: 1~10.pubKey-公钥信息。包括区域公钥 + 用US_PVK签名得到的签名信息。Public key information. Including regional public key + information obtained by signing with US_PVK.merchantID-和账号数据一起加密的商户ID。Merchant ID encrypted with account data.- Throws:
P2PEException- P2PEException- Since:
- V3.22.00
-
taEncryptData
TAEncryptedResult taEncryptData(int keyIndex, byte[] plainData) throws P2PEException
用RSA公钥对明文账号数据和商户ID进行加密。Use the RSA public key to encrypt the plaintext account data and merchant ID.- Parameters:
keyIndex-RSA公钥索引。范围:1~10。RSA public key index. Range: 1~10.plainData-明文数据。如果是通过new String().getBytes()得到明文,需要在字符串后面加上"\0"。Plain text data. If you get the plaintext through new String().getBytes(), you need to add "\0" after the string.- Returns:
TAEncryptedResult- Throws:
P2PEException- P2PEException- Since:
- V3.22.00
-
taDestroyContext
void taDestroyContext(int keyIndex) throws P2PEException
结束Trans-Armor加密。End Trans-Armor encryption.- Parameters:
keyIndex-RSA公钥索引。范围:1~10。RSA public key index. Range: 1~10.- Throws:
P2PEException- P2PEException- Since:
- V3.22.00
-
-