Ejemplo n.º 1
0
        private void GenerateRng(object sender, RoutedEventArgs e)
        {
            window.Cursor = Cursors.Wait;
            int bytesPerPixel = Encryption.CountBytesPerPixel(uploadedImg.Source as BitmapSource);

            if (Encryption.currentAlg == 0)
            {
                TranspositionAlg.Generate((sender as Button).Name, Int32.Parse((sender as Button).Uid), null);
            }
            else
            {
                SymetricAlg.Generate(null);
            }
            window.Cursor = Cursors.Arrow;
        }
Ejemplo n.º 2
0
        private void GeneratePass(object sender, RoutedEventArgs e)
        {
            window.Cursor = Cursors.Wait;
            if (currentAction == 1)
            {
                decrypted = false;
            }
            int bytesPerPixel = Encryption.CountBytesPerPixel(uploadedImg.Source as BitmapSource);

            if (Encryption.currentAlg == 0)
            {
                TranspositionAlg.Generate((sender as PasswordBox).Name, Int32.Parse((sender as PasswordBox).Uid), (sender as PasswordBox).Password);
            }
            else
            {
                SymetricAlg.Generate((sender as PasswordBox).Password);
            }
            window.Cursor = Cursors.Arrow;
        }