public static async Task InitialSetup(CryptographicKey AesKey)
        {
            StoreRsaKey(GenerateRsaKey(), AesKey);
            await StorageInterface.WriteToRoamingFolder("PWM/Passwords0", "");

            await StorageInterface.WriteToRoamingFolder("PWM/INDEX", "1");
        }
        public static async Task StorePasswords(String Passwords, CryptographicKey AesKey)
        {
            CryptographicKey k = await GetRasKey(AesKey);

            int a = int.Parse(await StorageInterface.ReadFromRoamingFolder("PWM/INDEX"));

            for (int i = 0; i < a; i++)
            {
                await StorageInterface.DeleteFromRoamingFolder("PWM/Passwords" + i);
            }


            String[] PWD = Passwords.DivideToLength(768);
            await StorageInterface.WriteToRoamingFolder("PWM/INDEX", PWD.Length.ToString());

            for (int i = 0; i < PWD.Length; i++)
            {
                IBuffer plain   = CryptographicBuffer.ConvertStringToBinary(PWD[i], BinaryStringEncoding.Utf8);
                IBuffer cryptic = CryptographicEngine.Encrypt(k, plain, null);
                await StorageInterface.WriteBufferToRoamingFolder("PWM/Passwords" + i, cryptic);
            }
        }
Exemple #3
0
        private async void AddEntryButton_Click(object sender, RoutedEventArgs e)
        {
            await StorageInterface.WriteToRoamingFolder("PoloTanken.csv", await StorageInterface.ReadFromRoamingFolder("PoloTanken.csv") + "\r\n" + await InputTextDialogAsync("Neue Batankung"));

            await Refresh();
        }