예제 #1
0
 public void Setup()
 {
     _memberInfo = MethodBase.GetCurrentMethod();
     _argument   = new object[] { 1, "abc", DateTime.Now, new List <decimal> {
                                      1m, 11.7m
                                  } };
     _default = KeyCreator.Default;
 }
예제 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CryptographicKeyWizard"/> class with a <see cref="IKeyCreator"/> and 
        /// for a specific <see cref="CryptographicKeyWizardStep"/>.
        /// </summary>
        /// <param name="keyCreator">The <see cref="IKeyCreator"/> that should be used to generate and validate an input key.</param>
        /// <param name="step">The <see cref="CryptographicKeyWizardStep"/> which should be shown within the wizard.</param>
        public CryptographicKeyWizard(CryptographicKeyWizardStep step, IKeyCreator keyCreator)
        {
            InitializeComponent();

            controlByCryptographicKeyWizardStep.Add(CryptographicKeyWizardStep.SupplyKey, supplyKeyControl);
            controlByCryptographicKeyWizardStep.Add(CryptographicKeyWizardStep.CreateNewKey, createNewKeyControl);
            controlByCryptographicKeyWizardStep.Add(CryptographicKeyWizardStep.OpenExistingKeyFile, openExistingKeyFileControl);
            controlByCryptographicKeyWizardStep.Add(CryptographicKeyWizardStep.ImportArchivedKey, importArchivedKeyControl);
            controlByCryptographicKeyWizardStep.Add(CryptographicKeyWizardStep.ChooseProtectionScope, chooseDpapiScopeControl);
            controlByCryptographicKeyWizardStep.Add(CryptographicKeyWizardStep.ChooseKeyFile, chooseProtectionScopeControl);

            btnCancel.Text = Resources.CryptographicKeyWizardCancelButton;
            btnPrevious.Text = Resources.CryptographicKeyWizardPreviousButton;
            btnNext.Text = Resources.CryptographicKeyWizardNextButton;
            btnFinish.Text = Resources.CryptographicKeyWizardFinishButton;
            Text = Resources.CryptographicKeyWizardTitle;

            createNewKeyControl.KeyCreator = keyCreator;

            currentWizardStep = step;
            RefreshWizardControls();
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="CryptographicKeyWizard"/> class with a <see cref="IKeyCreator"/> and
        /// for a specific <see cref="CryptographicKeyWizardStep"/>.
        /// </summary>
        /// <param name="keyCreator">The <see cref="IKeyCreator"/> that should be used to generate and validate an input key.</param>
        /// <param name="step">The <see cref="CryptographicKeyWizardStep"/> which should be shown within the wizard.</param>
        public CryptographicKeyWizard(CryptographicKeyWizardStep step, IKeyCreator keyCreator)
        {
            InitializeComponent();

            controlByCryptographicKeyWizardStep.Add(CryptographicKeyWizardStep.SupplyKey, supplyKeyControl);
            controlByCryptographicKeyWizardStep.Add(CryptographicKeyWizardStep.CreateNewKey, createNewKeyControl);
            controlByCryptographicKeyWizardStep.Add(CryptographicKeyWizardStep.OpenExistingKeyFile, openExistingKeyFileControl);
            controlByCryptographicKeyWizardStep.Add(CryptographicKeyWizardStep.ImportArchivedKey, importArchivedKeyControl);
            controlByCryptographicKeyWizardStep.Add(CryptographicKeyWizardStep.ChooseProtectionScope, chooseDpapiScopeControl);
            controlByCryptographicKeyWizardStep.Add(CryptographicKeyWizardStep.ChooseKeyFile, chooseProtectionScopeControl);

            btnCancel.Text   = Resources.CryptographicKeyWizardCancelButton;
            btnPrevious.Text = Resources.CryptographicKeyWizardPreviousButton;
            btnNext.Text     = Resources.CryptographicKeyWizardNextButton;
            btnFinish.Text   = Resources.CryptographicKeyWizardFinishButton;
            Text             = Resources.CryptographicKeyWizardTitle;


            createNewKeyControl.KeyCreator = keyCreator;

            currentWizardStep = step;
            RefreshWizardControls();
        }
예제 #4
0
 public RSACryptography()
 {
     KeyCreator = new RSAKeyCreator();
 }
 /// <summary>
 /// Создает новый экземпляр SDK.
 /// </summary>
 /// <param name="terminalKey">Ключ терминала. Выдается после подключения к Тинькофф Эквайринг.</param>
 /// <param name="password">Пароль от терминала. Выдается вместе с terminalKey.</param>
 /// <param name="keyCreator"></param>
 public AcquiringSdk(string terminalKey, string password, IKeyCreator keyCreator)
 {
     this.terminalKey = terminalKey;
     this.password    = password;
     publicKey        = keyCreator.Create();
 }
예제 #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CryptographicKeyWizard"/> class with a <see cref="IKeyCreator"/>.
 /// </summary>
 /// <param name="keyCreator">The <see cref="IKeyCreator"/> that should be used to generate and validate an input key.</param>
 public CryptographicKeyWizard(IKeyCreator keyCreator)
     : this(CryptographicKeyWizardStep.SupplyKey, keyCreator)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="CryptographicKeyWizard"/> class with a <see cref="IKeyCreator"/>.
 /// </summary>
 /// <param name="keyCreator">The <see cref="IKeyCreator"/> that should be used to generate and validate an input key.</param>
 public CryptographicKeyWizard(IKeyCreator keyCreator)
     : this(CryptographicKeyWizardStep.SupplyKey, keyCreator)
 {
 }
예제 #8
0
 /// <summary>
 /// <para>Initialize a new instance of the <see cref="KeySettings"/> class with a <see cref="IKeyCreator"/></para>
 /// </summary>
 /// <param name="keyCreator">The key creator that created the key.</param>
 public KeySettings(IKeyCreator keyCreator)
 {
     this.keyCreator = keyCreator;
 }
예제 #9
0
 /// <summary>
 /// <para>Initialize a new instance of the <see cref="KeySettings"/> class with a <see cref="IKeyCreator"/></para>
 /// </summary>
 /// <param name="keyCreator">The key creator that created the key.</param>
 public KeySettings(IKeyCreator keyCreator)
 {
     this.keyCreator = keyCreator;
 }