Files
duplicati/Duplicati/Library/Main/Operation/Restore/VolumeDecrypter.cs
T
2024-11-08 10:06:00 +01:00

29 lines
844 B
C#

using System;
using System.Threading.Tasks;
using CoCoL;
namespace Duplicati.Library.Main.Operation.Restore
{
internal class VolumeDecrypter
{
public static Task Run()
{
return AutomationExtensions.RunTask(
new
{
Input = Channels.downloadedVolume.ForRead,
Output = Channels.decryptedVolume.ForWrite
},
async self =>
{
while (true)
{
var volume = await self.Input.ReadAsync();
// NOP operation for now - decryption is handled by the backend during download.
Console.WriteLine($"Decrypted volume: '{volume.Name}'");
await self.Output.WriteAsync(volume);
}
});
}
}
}