mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 15:40:18 -04:00
WIP Split composite key user control
Some refactoring
This commit is contained in:
@@ -10,7 +10,6 @@ namespace ModernKeePass.Infrastructure.KeePass
|
||||
{
|
||||
public EntryMappingProfile()
|
||||
{
|
||||
Uri url;
|
||||
CreateMap<PwEntry, EntryEntity>()
|
||||
.ForMember(dest => dest.ParentId, opt => opt.MapFrom(src => src.ParentGroup.Uuid.ToHexString()))
|
||||
.ForMember(dest => dest.ParentName, opt => opt.MapFrom(src => src.ParentGroup.Name))
|
||||
@@ -18,12 +17,7 @@ namespace ModernKeePass.Infrastructure.KeePass
|
||||
.ForMember(dest => dest.Name, opt => opt.MapFrom(src => GetEntryValue(src, PwDefs.TitleField)))
|
||||
.ForMember(dest => dest.UserName, opt => opt.MapFrom(src => GetEntryValue(src, PwDefs.UserNameField)))
|
||||
.ForMember(dest => dest.Password, opt => opt.MapFrom(src => GetEntryValue(src, PwDefs.PasswordField)))
|
||||
.ForMember(dest => dest.Url, opt =>
|
||||
{
|
||||
opt.PreCondition(src =>
|
||||
Uri.TryCreate(GetEntryValue(src, PwDefs.UrlField), UriKind.Absolute, out url));
|
||||
opt.MapFrom(src => new Uri(GetEntryValue(src, PwDefs.UrlField)));
|
||||
})
|
||||
.ForMember(dest => dest.Url, opt => opt.MapFrom(src => GetEntryValue(src, PwDefs.UrlField)))
|
||||
.ForMember(dest => dest.Notes, opt => opt.MapFrom(src => GetEntryValue(src, PwDefs.NotesField)))
|
||||
.ForMember(dest => dest.ForegroundColor, opt => opt.MapFrom(src => src.ForegroundColor))
|
||||
.ForMember(dest => dest.BackgroundColor, opt => opt.MapFrom(src => src.BackgroundColor))
|
||||
|
@@ -7,7 +7,7 @@ using ModernKeePassLib.Security;
|
||||
|
||||
namespace ModernKeePass.Infrastructure.KeePass
|
||||
{
|
||||
public class KeePassPasswordClient: IPasswordProxy
|
||||
public class KeePassCredentialsClient: ICredentialsProxy
|
||||
{
|
||||
public string GeneratePassword(PasswordGenerationOptions options)
|
||||
{
|
||||
@@ -35,9 +35,9 @@ namespace ModernKeePass.Infrastructure.KeePass
|
||||
return password.ReadString();
|
||||
}
|
||||
|
||||
public uint EstimatePasswordComplexity(string password)
|
||||
public int EstimatePasswordComplexity(string password)
|
||||
{
|
||||
return QualityEstimation.EstimatePasswordBits(password?.ToCharArray());
|
||||
return (int)QualityEstimation.EstimatePasswordBits(password?.ToCharArray());
|
||||
}
|
||||
|
||||
public byte[] GenerateKeyFile(byte[] additionalEntropy)
|
Reference in New Issue
Block a user