In fact, private methods are implemented in C# that can still be searched with Reflection
.
What I am going to do is to write public string Encrypt(string data)
and private string Decrypt(string cipher)
methods to perform encryption and decryption.
Unfortunately, if someone knows .NET framework, he can use Reflection
to find Decrypt
methods and it decrypt everything that is encrypted.
It seems that is not that secure. So I want to make Decrypt
method to truly private method.
But how to do that?
Updated 09 Jan 2012 10:52PM Sydney Time
bdares provides the technical explanation of this question
Eric Lippert provides the political explanation of this question
Thanks both experts!