-1

I've created a library class in vb.net that obtains some data from a database. This dll can be used by other apps so I want to protect the access to this dll's methods by using a login and password. How can I implement this?

CAbbott
  • 8,078
  • 4
  • 31
  • 38
HugoBeto
  • 13
  • 3

2 Answers2

0

You are going to need some sort of Obfuscation tool. However, if it is public, then it is still going to be crackable to some extent.

I am not sure if I would call this an exact duplicate, but here is a link to a SO question about obfuscation

If you still want an obfuscation tool, then I would try Dotfuscator

Community
  • 1
  • 1
Justin Pihony
  • 66,056
  • 18
  • 147
  • 180
0

You can:

Add username/password to each of your method calls, mimicking a per call login OR

Use a common login class that can be passed with each call OR

Set instance of the login class as your DLL's property.

However, what Justin probably means is that even if you add username/password by any of above, because the DLL is public, someone can use Disassembler to look at the code.

If you can query a database on line to validate the login credentials, then it is OK, otherwise the login credentials themselves are open to spying.

To prevent that, you will need to use some sort of obfuscation.

Shrieks
  • 141
  • 1
  • 6