문제

I am looking to encrypt files with X509 certificates using public and private keys and send them to a remote server. How would I do this? Is this even possible? How do I generate the certificate and then the public and private key pairs?

도움이 되었습니까?

해결책

See this SO question how to create a RSACryptoServiceProvider from a X509Certificate2 that can be used to encrypt and decrypt files.

The .NET framework does not contain classes to generate X.509 certificates. Mono's security classes (Mono.Security.X509) and BouncyCastle support the creation of X.509 certificates from C#. Alternatively, you can use tools like OpenSSL or makecert.exe to generate certificates.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top