Encrypt data with X509 certificate's private key in UWP
问题 I'm displaying to the user every available certificates in his personal store, fetched with the following method : public List<X509Certificate2> GetPersonalCertificates() { var certificates = new List<X509Certificate2>(); using (var store = new X509Store(StoreName.My, StoreLocation.CurrentUser)) { store.Open(OpenFlags.MaxAllowed); foreach (var certificate in store.Certificates) { if (certificate != null && certificate.HasPrivateKey) { certificates.Add(certificate); } } } return certificates;