Creating Session Object with Encrypted password

Advertisement

ddicroce
Joined:
Posts:
1

Creating Session Object with Encrypted password

I would like to know if it is possible to create the Sesson object and use the encrypted password for the password to avoid having a clear text password in my source code.

SessionOptions sessionOptions = new SessionOptions
{Protocol = WinSCP.Protocol.Sftp,
HostName = "server",
UserName = "user",
Password = "[i]encryptedpassword@",[/i]
PortNumber = 22,
SshHostKeyFingerprint = "ssh-rsa xxxx xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"
};

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

Re: Creating Session Object with Encrypted password

There's no way so safely encrypt password in a way that still allow automation.

All we can do to introduce some obfuscation. But you can do that on your own.
_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum