public class WechatUtils extends Object
| 构造器和说明 |
|---|
WechatUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
decryptToString(String associatedData,
String nonce,
String ciphertext)
使用v3key进行AES解密
|
static X509Certificate |
getCertificate()
从证书文件中读取证书
|
private static String |
getKeyAlias()
从证书文件中获取KeyAlias
|
private static KeyStore |
getKeyStore()
从证书文件中获取KeyStore
|
static PrivateKey |
getPrivateKey()
从证书文件中读取证书读取私钥
|
static PrivateKey |
getPrivateKey(String filename)
从私钥文件读取私钥
|
static String |
getSerialNumber()
从证书文件中读取证书读取系列号
|
static Map<String,X509Certificate> |
refreshCertificate()
获取平台证书Map
|
public static String getSerialNumber() throws Exception
Exceptionpublic static PrivateKey getPrivateKey() throws Exception
Exceptionprivate static KeyStore getKeyStore() throws KeyStoreException, CertificateException, IOException, NoSuchAlgorithmException
KeyStoreExceptionCertificateExceptionIOExceptionNoSuchAlgorithmExceptionprivate static String getKeyAlias() throws KeyStoreException, CertificateException, IOException, NoSuchAlgorithmException
KeyStoreExceptionCertificateExceptionIOExceptionNoSuchAlgorithmExceptionpublic static X509Certificate getCertificate() throws Exception
Exceptionpublic static PrivateKey getPrivateKey(String filename) throws IOException
filename - IOExceptionpublic static Map<String,X509Certificate> refreshCertificate() throws Exception
ParseExceptionCertificateExceptionExceptionCopyright © 2023. All rights reserved.