public static X509Certificate2 GetCertFromCont(string pin, string CertCont) { CspParameters cspParameters = new CspParameters(75); cspParameters.KeyContainerName = CertCont; cspParameters.Flags = CspProviderFlags.NoPrompt; if (pin != "") { System.Security.SecureString s = new System.Security.SecureString(); foreach (char z in pin) s.AppendChar(z); cspParameters.KeyPassword = s; } try { Gost3410CryptoServiceProvider prov = new Gost3410CryptoServiceProvider( cspParameters); return prov.ContainerCertificate; } catch (Exception e) { //System.Windows.MessageBox.Show(e.Message); return null; } }
с# get GOST 3410 certificate from container
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: only a member of this blog may post a comment.