我在C++中創建服務器端程序,程序使用openssl庫創建RSA公鑰和私鑰,然後通過網絡爲客戶端分配公鑰。在客戶端我寫了c#程序先獲取公鑰然後加密數據。但我無法將公鑰添加到RSACryptoServiceProvider。將openssl公鑰導入C#RSACryptoServiceProvider
有沒有辦法將RSA公鑰導入RSACryptoServiceProvider?
----- BEGIN RSA公鑰----- MIIBCAKCAQEAsgVkBAQPdtRtICOqWdZ0ZiMAb9UvUX0BaxANN22bL5RzTJAL + PMG QKaA61B1m0NPOjdIIXMwkaAzXOmzuNwKm2Ugb8jO15B6ovAhe73jAoltFFdi10Te zCJgT8/xLAWt1mOXCAK9vD4Pv5LMN76BF + YjEVvylQ3l87255ElZrP4UluCGj0U3 uczW8 + Cqao3QoL6xSxPU9jSK0FT/OhAL312cAXYbnaiJH + wAf1kkv4ez28XAlFId MlCmh2n8YSuxk1GdOXaps8IoluDzmHeQ8vk2quQMPpFXzfCayBoPm9lVPOjOQkAH 8ClJda0Uy052N5aE0BuyX1KRxOSdRRKk9wIBAw ==
- ---結束RSA公共密鑰-----
這是否Project幫助:https://github.com/openssl-net/openssl-net –