/// <summary>
 /// Default constructor
 /// </summary>
 public AsymmetricEncryptionDesignModel()
 {
     DataInput.DataFormatSelected = Format.File;
     DataInput.Data = @"FilePath\Desktop\file.txt";
     KeyName        = "Some name";
     KeyPairSetup   = new KeyPairSetupViewModel(CryptographyApi.MSDN, AsymmetricOperation.Encryption);
 }
 /// <summary>
 /// Default constructor
 /// </summary>
 public AsymmetricKeyExchangeDesignModel()
 {
     DataInput.DataFormatSelected = Format.Text;
     DataInput.Data = "Some message";
     KeyName        = "Some name";
     KeyPairSetup   = new KeyPairSetupViewModel(CryptographyApi.MSDN, AsymmetricOperation.KeyExchange);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Default constructor
 /// </summary>
 public AsymmetricSignatureDesignModel()
 {
     DataInput.DataFormatSelected = Format.Hex;
     DataInput.Data = "ffaa1111ff";
     KeyName        = "Some name";
     KeyPairSetup   = new KeyPairSetupViewModel(CryptographyApi.MSDN, AsymmetricOperation.Signature);
     KeyPairSetup.SelectedAlgorithimIndex = 2;
     KeyPairSetup.ChangedAlgorithim();
 }
Ejemplo n.º 4
0
        /// <summary>
        /// Initialize any properties
        /// </summary>
        /// <param name="api"></param>
        /// <param name="operation"></param>
        private void InitializeProperties(CryptographyApi api, AsymmetricOperation operation)
        {
            KeyPairSetup = new KeyPairSetupViewModel(api, operation);

            //Hook into the DataChanged event
            DataInput.DataChanged += DataInput_DataChanged;

            //Hook into the KeysLoaded event
            KeyPairSetup.KeysLoaded += KeyPairSetup_KeysLoaded;

            //Hook into the KeyPairChanged event
            KeyPairSetup.KeyPairChanged += KeyPairSetup_KeyPairChanged;
        }