RSA

一、windows安裝opensslphp

http://www.javashuo.com/article/p-mblbmyju-p.htmlhtml

二、從.pfx文件中提取私鑰和證書java

https://www.php.cn/windows-416177.html算法

三、RSA加密與解密(Java實現)apache

http://www.javashuo.com/article/p-aptvmbxh-gw.htmlwindows

四、Base64編碼與Java版本實現編碼

https://www.jianshu.com/p/79ecc613ed21加密

五、RSA/RSA2 進行簽名和驗籤spa

http://www.javashuo.com/article/p-oxhfhknz-bp.html.net

六、獲取public.cer公鑰

 1 import java.io.FileInputStream;
 2 import java.security.PublicKey;
 3 import java.security.cert.CertificateFactory;
 4 import java.security.cert.X509Certificate;
 5 
 6 import org.apache.commons.codec.binary.Base64;
 7 
 8 public class GetPublicKeyFromCer {
 9     
10     public static String getPublicKey() {
11         try {
12             CertificateFactory certFactory = CertificateFactory.getInstance("X.509");
13             X509Certificate cert = (X509Certificate) certFactory.generateCertificate(new FileInputStream("D:/test/public.cer")); // cer證書路徑
14             PublicKey publicKey = cert.getPublicKey();
15             String pubKey = new String(Base64.encodeBase64(publicKey.getEncoded()));
16             return pubKey;
17         } catch (Exception e) {
18             e.printStackTrace();
19         }
20         
21         return null;
22     }
23 }

 七、AES、DES算法比較、區別

淺析DES與AES、RSA三種典型加密算法的比較

對加密的瞭解(DES/3DES/AES區別 )

加密算法(DES,AES,RSA,MD5,SHA1,Base64)比較和項目應用

八、MD五、SHA1區別

http://www.javashuo.com/article/p-aefrrivn-n.html

相關文章
相關標籤/搜索