Package com.wechat.pay.java.core.cipher
Class AbstractPrivacyEncryptor
java.lang.Object
com.wechat.pay.java.core.cipher.AbstractPrivacyEncryptor
- All Implemented Interfaces:
PrivacyEncryptor
- Direct Known Subclasses:
RSAPkcs1v15Encryptor,RSAPrivacyEncryptor
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractPrivacyEncryptor(String transformation, PublicKey publicKey, String wechatPaySerial) -
Method Summary
Modifier and TypeMethodDescription加密并转换为字符串获取加密使用公钥所属证书的证书序列号,可设置到请求的 HTTP 头部 Wechatpay-Serial
-
Constructor Details
-
AbstractPrivacyEncryptor
-
-
Method Details
-
encrypt
Description copied from interface:PrivacyEncryptor加密并转换为字符串- Specified by:
encryptin interfacePrivacyEncryptor- Parameters:
plaintext- 明文- Returns:
- Base64编码的密文
-
getWechatpaySerial
Description copied from interface:PrivacyEncryptor获取加密使用公钥所属证书的证书序列号,可设置到请求的 HTTP 头部 Wechatpay-Serial- Specified by:
getWechatpaySerialin interfacePrivacyEncryptor- Returns:
- 证书序列号
-