Подписать xml файл цифровой подписью с ключем (key.dat) и паролем C#

Доброе время суток, у меня задача, подписать file.xml, ключем key-6.dat с паролем 1234. Пробовал использовать System.Security.Cryptography.X509Certificates.

string Filename = "C:/Users/Key-6.dat";
        string Password = "2910";
        X509Certificate2 certificate = new X509Certificate2(Filename, Password);
        RSACryptoServiceProvider rsaCsp = (RSACryptoServiceProvider)certificate.PrivateKey;

получаю ошибку: System.Security.Cryptography.CryptographicException: 'The specified network password is not correct.


Ответы (0 шт):