Re: WeOnlyDo.Security.Cryptography.KeyManager.Load (General questions)
Hi Drazen,
Thanks a lot, it works!
My .Net Example with FtpDLX.NET:
================================
WeOnlyDo.Client.FtpDLX ftp1 = new WeOnlyDo.Client.FtpDLX();
ftp1.Hostname = textBox1.Text;
ftp1.Login = textBox2.Text;
ftp1.Password = textBox3.Text;
progressBar1.Minimum = 0;
ftp1.Protocol = WeOnlyDo.Client.Protocols.SFTP;
ftp1.Authentication = WeOnlyDo.Client.Authentications.PublicKey;
WeOnlyDo.Security.Cryptography.KeyManager keyManager = new WeOnlyDo.Security.Cryptography.KeyManager();
keyManager.Load(@ -----BEGIN RSA PRIVATE KEY-----
XXXXX... etc. ...XXXX
-----END RSA PRIVATE KEY----- , textBox3.Text);
ftp1.PrivateKey = keyManager.ToXmlString(WeOnlyDo.Security.Cryptography.SSHKeyTypes.RSAKey, true);
ftp1.Blocking = true;
ftp1.Port = System.Convert.ToInt32(textBox4.Text);
ftp1.Connect();
Regards,
Tom
H Tom,
Actually you can load private key from a string value in Load Method.Here is example:
http://www.weonlydo.com/index.asp?kb=1&View=entry&EntryID=73Example is for our wodKeys component but principle should be same for wodKeyManager.NET.
In example please look as Key.Load Method line how private key should be loaded in.
Let us know how it goes.
Regards,
Drazen
[:smile:][:smile:][:smile:]
Complete thread:
- WeOnlyDo.Security.Cryptography.KeyManager.Load usi - Tom, 2009-12-14, 15:05
- Re: WeOnlyDo.Security.Cryptography.KeyManager.Load - woddrazen, 2009-12-14, 15:36
- Re: WeOnlyDo.Security.Cryptography.KeyManager.Load - Tom, 2009-12-14, 17:10
- Re: WeOnlyDo.Security.Cryptography.KeyManager.Load - woddrazen, 2009-12-14, 15:36