Page 1 of 1

Store key to stream or string?

Posted: Mon 26 May 2008 02:09
by snorkel
Hi,
I see there is a way to store a key from the server in the registry or a file, but how can I save it to a stream or string?

I have a db connection object and would like to store the key as part of that object, which I then store the contents in the registry as a string via object streaming.

Thanks,

Snorkel

Posted: Tue 27 May 2008 07:21
by Dimon
In order to save key in a stream you should use the TScKey.ExportTo method and set the Stream param.
But in this case in order for ScSSHClient or ScSSHServer to use this key you need to import it in a storage.