/// <summary> /// Decorates the steam, so it can be written to the virtual file system. /// </summary> /// <param name="stream">The stream.</param> /// <returns></returns> public Stream DecorateToVFS(Stream stream) { var encryptor = new SelfMadeSimpleCryptor(_options.Key, _options.InitializationVector, CryptoDirection.Encrypt); return new CryptoStream(stream, encryptor, CryptoStreamMode.Write); }
/// <summary> /// Decorates the steam, so it can be written to the host system. /// </summary> /// <param name="stream">The stream.</param> /// <returns></returns> public Stream DecorateToHost(Stream stream) { var decryptor = new SelfMadeSimpleCryptor(_options.Key, _options.InitializationVector, CryptoDirection.Decrypt); return new CryptoStream(stream, decryptor, CryptoStreamMode.Read); }