Search code examples
c#encryptioncryptographypublic-key-encryptionrsacryptoserviceprovider

Using RSACryptoServiceProvider in C# to encrypt/decrypt an excel file?


How can I use private/public keys for encryption/decryption of an an excel file in C#.NET?

The article RSA Encryption in C# describes a way of doing this encryption, but this example only works for encrypting/decrypting text, not for an excel file.

How can I encrypt / decrypt an excel file (using asymmetric RSA encryption)?


Solution

  • The link you provide is not the way you should use RSA to encrypt data (such as a file). I have an old (but still up to date) blog entry on the subject:

    http://pages.infinit.net/ctech/20031101-0151.html