Rsa Cryptography in c#. i have encrypted an xml file and saved it -


I encrypted an XML file and saved it in cryptographic cryptography C #. After that I transferred this file to another PC. The main problem is that it is not a DNS, D decrypt. why not? When the MIM decrypts on the same machine, the XML file decrypts.

  public static byte [] decryptfile (XML document dock, RSA RSAK, string keyname) / P> doctor = new XmlDocument (); Doc.PreserveWhitespace = True; Doc.Load (@ "MLPACK1.xml"); Encrypted Xml Encocolx = New Encrypted XML (Doctor); Encoxm.ADKNememapapping (name, RSAK); EncXml.DecryptDocument (); String contentoffdid = Doc.OuterXml; Byte [] buffer = strawberry array (contentofdecution); Return buffer; }  

You used (....) the third parameter scope of the method method (Enum) type.

It seems that you have defined DataProtectionScope.LocalMachine (or even DataProtectionScope.CurrentUser) for DTP and passed it to secure the method.

Like it

Data ProtectionCheckDPS = DataTransactionScope Localmachine Protected Data Protected (bytes, blank, DPS);

So this may be the source of the problem.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -