public static X509Certificate2 GetCertStorePass(string pin, X509Certificate2 certificate2) { var provider = (Gost3410CryptoServiceProvider)certificate2.PrivateKey; var secure = new System.Security.SecureString(); foreach (char charPass in pin) secure.AppendChar(charPass); provider.SetContainerPassword(secure); return provider.ContainerCertificate; }
No comments:
Post a Comment
Note: only a member of this blog may post a comment.