public HybridRsaAesConvertTextDialog(ActionType actionType, Cube.Secure.WinForms.Logic.RSA rsaCryptoProvider, AES aesCryptoProvider)
 {
     InitializeComponent();
     this.actionType        = actionType;
     this.rsaCryptoProvider = rsaCryptoProvider;
     this.aesCryptoProvider = aesCryptoProvider;
     this.actionBtn.Text    = this.actionType == ActionType.Encrypt ? "Encrypt" : "Decrypt";
 }
Example #2
0
        public SignFileDialog(string filePath, Cube.Secure.WinForms.Logic.RSA rsa)
        {
            InitializeComponent();
            if (!string.IsNullOrEmpty(filePath))
            {
                this.CalculateHashes(filePath);
            }

            this.rsa = rsa;
        }
Example #3
0
        public VerifyFileDialog(string filePath, Cube.Secure.WinForms.Logic.RSA rsa)
        {
            InitializeComponent();
            if (!string.IsNullOrEmpty(filePath))
            {
                this.CalculateHashes(filePath);
                var defaultSignatureFileName = this.GetSignatureDefaultFileName(filePath);
                if (File.Exists(defaultSignatureFileName))
                {
                    this.signatureTextBox.Text = defaultSignatureFileName;
                }
            }

            this.rsa = rsa;
        }