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.GetCiphers
{
public class GetCiphersQueryHandler: IRequestHandler<GetCiphersQuery, IEnumerable<CipherVm>>
{
private readonly ICryptographyClient _cryptography;
private readonly IDatabaseSettingsProxy _databaseSettings;
public GetCiphersQueryHandler(ICryptographyClient cryptography)
public GetCiphersQueryHandler(IDatabaseSettingsProxy databaseSettings)
{
_cryptography = cryptography;
_databaseSettings = databaseSettings;
}
public IEnumerable<CipherVm> Handle(GetCiphersQuery message)
{
return _cryptography.Ciphers.Select(c => new CipherVm
return _databaseSettings.Ciphers.Select(c => new CipherVm
{
Id = c.Id,
Name = c.Name