How do I generate and import the Machine Key in a Visual Basic windows form for use in a method?

174 views Asked by At

Background: I have a windows form that accesses a database, the connection strings are view-able from the project level in string format. I don't like the idea of someone decompiling my software and having my connection data in plain text. I have a class which will encrypt and decrypt a string when provided the key as a parameter. What I don't know is how to get that 'machine key' and incorporate it as a parameter in my visual basic method.

encryptorInstance(machineKey) as new Encryptor
encryptorInstance.encrypt('password')
encryptorInstance.decrypt('h1%^#ssahastattr')

I'm not sure what the necessary imports would be, and many of the tutorials I find assume basic knowledge of the 'machine key'.

0

There are 0 answers