public interface IAsymmetricEncryptor
| 限定符和类型 | 方法和说明 |
|---|---|
String |
decrypt(String cipherTextBase64,
String charset,
String privateKey)
对密文进行非对称解密
|
String |
encrypt(String plainText,
String charset,
String publicKey)
对明文进行非对称加密
|
String |
sign(String content,
String charset,
String privateKey)
计算指定内容的签名
|
boolean |
verify(String content,
String charset,
String publicKey,
String sign)
验证指定内容的签名是否正确
|
String sign(String content, String charset, String privateKey) throws AlipayApiException
content - 待签名的原文charset - 待签名的原文的字符集编码privateKey - 私钥字符串AlipayApiExceptionboolean verify(String content, String charset, String publicKey, String sign) throws AlipayApiException
content - 待校验的原文charset - 待校验的原文的字符集编码publicKey - 公钥字符串sign - 签名字符串AlipayApiExceptionString encrypt(String plainText, String charset, String publicKey) throws AlipayApiException
plainText - 明文字符串charset - 明文的字符集编码publicKey - 公钥字符串AlipayApiExceptionString decrypt(String cipherTextBase64, String charset, String privateKey) throws AlipayApiException
cipherTextBase64 - 密文Base64编码字符串charset - 明文的字符集编码privateKey - 私钥字符串AlipayApiExceptionCopyright © 2025. All rights reserved.