Added a cryptography service to encrypt protected information (unused atm)

Corrected a bug when deleting recycle bin
This commit is contained in:
Geoffroy BONNEVILLE
2020-05-14 12:05:05 +02:00
parent 2e01fa2212
commit 72e5bf4ee1
14 changed files with 87 additions and 24 deletions

View File

@@ -10,16 +10,16 @@ namespace ModernKeePass.Application.Parameters.Queries.GetKeyDerivations
{
public class GetKeyDerivationsQueryHandler : IRequestHandler<GetKeyDerivationsQuery, IEnumerable<KeyDerivationVm>>
{
private readonly ICryptographyClient _cryptography;
private readonly IDatabaseSettingsProxy _databaseSettings;
public GetKeyDerivationsQueryHandler(ICryptographyClient cryptography)
public GetKeyDerivationsQueryHandler(IDatabaseSettingsProxy databaseSettings)
{
_cryptography = cryptography;
_databaseSettings = databaseSettings;
}
public IEnumerable<KeyDerivationVm> Handle(GetKeyDerivationsQuery message)
{
return _cryptography.KeyDerivations.Select(c => new KeyDerivationVm
return _databaseSettings.KeyDerivations.Select(c => new KeyDerivationVm
{
Id = c.Id,
Name = c.Name