encyption wip

This commit is contained in:
TheXamlGuy
2024-04-29 21:42:04 +01:00
parent bfdffb2901
commit 2a4194ee22
27 changed files with 437 additions and 137 deletions
+24
View File
@@ -0,0 +1,24 @@
using Toolkit.Foundation;
namespace Bitvault;
public class OpenVaultHandler(IMediator mediator) :
IHandler<Open<Vault>, bool>
{
public async Task<bool> Handle(Open<Vault> args,
CancellationToken cancellationToken)
{
if (args.Value is Vault vault)
{
if (vault.Password is { Length: > 0 } password)
{
if (await mediator.Handle<Open<VaultStorage>, bool>(Open.As(new VaultStorage("Personal", password)), cancellationToken))
{
return true;
}
}
}
return false;
}
}