Re: public key - WeOnlyDo Discussion board

Re: public key (General questions)

by Bertrand DEMARCQ, Thursday, April 17, 2008, 16:43 (5862 days ago) @ woddrazen

Hi dear Drazen,

I get the error Error 1 The type or namespace name 'WODSSHKeyLib' could not be found (are you missing a using directive or an assembly reference?) when I using this sample code.
How can I add a specific reference to code ?
Thanks,

Bertrand

Hi Bertrand,


Here is example how to generate and save private and public key in C# using wodKeys:
[code]WODSSHKeyLib.Keys key;
key = new WODSSHKeyLib.Keys();

key.Generate(WODSSHKeyLib.SSHKeyTypes.RSAkey,1024);
key.Save(WODSSHKeyLib.SSHKeyTypes.RSAkey, c:\private.txt , weonlydo );
key.PublicKeySave(WODSSHKeyLib.SSHKeyTypes.RSAkey, c:\public.txt );
Console.Write(key.get_PublicKeyOpenSSH(WODSSHKeyLib.SSHKeyTypes.RSAkey)); [/code]
Let us know how it goes.


Regards,
Drazen


Complete thread: