Question how hidden are string resources?

Budius

Well-known member
Joined
Aug 6, 2010
Messages
137
Location
UK
Programming Experience
3-5
Hi,

I know that if you create a string like:
VB.NET:
dim a as string = "My String"
if you open the compiled .exe in a hex editor you will see there "My String"

now my question is about the Resources:
if I add a string there, how easy would be for one to have access to it?
Is it a plain xml that anyone could see or does it stay pretty hidden?

the reason behind my question is because I'll need some cryptography in my next project and I'm planning on storing the cryptography key in there.
 
For anyone looking for a managed compiled resource within your assembly they can read it in plain text.
 
ok then...
I guess it's just better put it in the code... at least the person need to take the time to use a hex editor to find it.

-------
edit:

just in case anyone curious, I ended up declaring 2 strings with same length and made a FOR loop on them to built the final password, something like:
VB.NET:
        For i As Integer = 0 To pw1.Length - 1
            password = password & pw1.Chars(pw1.Length - i) & pw2.Chars(i)
        Next
 
Last edited:

I'm not sure it does apply to the context of my application... I'll dig deeper on it for a bit to check... thanks!!

The situation here is a license file that makes the application stop work after its expiry date. The application is 100% offline and will be used by half a dozen suppliers around the world which usually doesn't even know how to install a printer driver. The only point about the license is in case my company doesn't want to renew the contract they won't be able to carry on producing our goods.
I know expiry dates in offline systems are lame because anyone can change the system clock but it will work because the goods have 12months expiry. Therefore if they change the system clock the produced goods will last less.
 
Back
Top