How can I hide the SMTP authentication data?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I’m sending mail form my C#/.NET assembly, and for that I’m doing
authentication like that:

MailMessage MyMail = new MailMessage()
MyMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1")
MyMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "UserName")
MyMail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", " password");

And by using tools like the ‘Microsoft .NET Framework IL DASM’ and
‘Reflector’, this user name and password can be seen Easley.

Is there a way to put the name and password in same hidden way?
How can I hide this data form disassembly tools?
 
You could encrypt/decrypt it. You could store it in a database and read it
out as needed. You could hide it in a longer string and write your own
secret way of extracting it which would deter only the average users. It
all depends on how secure you want it. Look into RSA encryption, there are
classes for these. See .Net TripleDESCryptoServiceProvider()

JIM
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top