mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-03 23:50:18 -04:00
Adds the ability to create key files (no entropy generator for now)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Windows.Storage.Pickers;
|
||||
using Windows.System;
|
||||
using Windows.UI.Xaml;
|
||||
@@ -81,5 +82,20 @@ namespace ModernKeePass.Controls
|
||||
if (file == null) return;
|
||||
Model.KeyFile = file;
|
||||
}
|
||||
|
||||
private async void CreateKeyFileButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var savePicker = new FileSavePicker
|
||||
{
|
||||
SuggestedStartLocation = PickerLocationId.DocumentsLibrary,
|
||||
SuggestedFileName = "Key"
|
||||
};
|
||||
savePicker.FileTypeChoices.Add("Key file", new List<string> { ".key" });
|
||||
|
||||
var file = await savePicker.PickSaveFileAsync();
|
||||
if (file == null) return;
|
||||
|
||||
Model.CreateKeyFile(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user