Esempio n. 1
0
 private void MergeSecret_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         var parts = textParts.Text.Trim().Split(new[] { '\n' }, StringSplitOptions.RemoveEmptyEntries);
         textSecret.Text = SecretSharing.MergeSecret(parts);
     }
     catch (Exception ex)
     {
         textSecret.Text = $"{ex.GetType()}:{ex.Message}";
     }
 }
Esempio n. 2
0
        private void SplitSecret_Click(object sender, RoutedEventArgs e)
        {
            var parts = SecretSharing.SplitSecret(textSecret.Text, int.Parse(textNeededCount.Text), int.Parse(textTotalCount.Text));

            textParts.Text = string.Join("\n", parts);
        }