Decrypting getfile stream. - WeOnlyDo Discussion board

Decrypting getfile stream. (General questions)

by Gwydion, Friday, January 28, 2005, 21:52 (7036 days ago)

I read in the wodSFTP.NET manual that it's possible to use streams with putfile and getfile methods. I want to decrypt the stream comming from the getfile method using CryptoStream and then store them on disk. I can't figure out how to get this to work.
Some code snippets.

UnicodeEncoding UE = new UnicodeEncoding();
byte[] key = UE.GetBytes( password );

RijndaelManaged RMCrypto = new RijndaelManaged();
CryptoStream cs = new CryptoStream( fsCrypt, RMCrypto.CreateDecryptor( key, key ), CryptoStreamMode.Read );


Complete thread: