Exemple #1
0
 /// <summary>
 /// Creates an instance to help with quarterround input action creation for the given round.
 /// </summary>
 /// <param name="round">Zero-based round index.</param>
 public QRIOActionCreator(ChaChaHashViewModel viewModel) : base(viewModel)
 {
     qrInValues           = new QRValue[] { VM.QRInA, VM.QRInB, VM.QRInC, VM.QRInD };
     qrOutValues          = new QRValue[] { VM.QROutA, VM.QROutB, VM.QROutC, VM.QROutD };
     diffusionQrInValues  = new QRValue[] { VM.DiffusionQRInA, VM.DiffusionQRInB, VM.DiffusionQRInC, VM.DiffusionQRInD };
     diffusionQrOutValues = new QRValue[] { VM.DiffusionQROutA, VM.DiffusionQROutB, VM.DiffusionQROutC, VM.DiffusionQROutD };
 }
Exemple #2
0
        private void OnDataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            ViewModel = (ChaChaHashViewModel)e.NewValue;
            if (ViewModel != null)
            {
                // On page enter, the real DOM and virtual DOM should be in sync.
                DomSync();

                ViewModel.PropertyChanged += new PropertyChangedEventHandler(OnViewModelPropertyChange);
                ActionViewBase.AddEventHandlers(ViewModel, Root);

                InitKeystreamBlockInput();
                InitRoundInput();
                InitQRInput();
            }
        }
 protected ChaChaHashActionCreator(ChaChaHashViewModel viewModel)
 {
     VM = viewModel;
 }
 /// <summary>
 /// Create an quarterround action creator instance
 /// for the given round.
 /// </summary>
 /// <param name="round">Zero-based round index.</param>
 protected QRStepOperationActionCreator(ChaChaHashViewModel viewModel, QRStepOperation operation) : base(viewModel)
 {
     Operation = operation;
 }
 public QRShiftActionCreator(ChaChaHashViewModel viewModel) : base(viewModel, QRStepOperation.SHIFT)
 {
 }
 public QRXORActionCreator(ChaChaHashViewModel viewModel) : base(viewModel, QRStepOperation.XOR)
 {
 }
 public QRAdditionActionCreator(ChaChaHashViewModel viewModel) : base(viewModel, QRStepOperation.ADD)
 {
 }
 public StateActionCreator(ChaChaHashViewModel viewModel) : base(viewModel)
 {
 }