المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : C# rsa



C# Programming
06-02-2009, 06:31 PM
I want to encrypt/decrypt some data with RSA. I have the private key (D and Modulus) and the public key (Exponent and Modulus) saved in text files.
When I tried to decrypt (encrypt data with private key) I tried to import RsaParameters with D and Modulus set to the values in the file and the other parameters set to null. On the Import method it throws a "Bad Data" Exception. It seems that I can only import RsaParameters when all of the parameters are set? Can I do it any other way?