private void MainForm_Load(object sender, EventArgs e) { InitializeGenericButtons(); InitializeTextBoxes(); ofd = new OpenFileDialog(); sfd = new SaveFileDialog(); cryptoAES = new CryptoAES(); cryptoRSA = new CryptoRSA(); cryptoSHA2 = new CryptoSHA2(); cryptoSHA2Manual = new CryptoSHA2Manual(); cryptoEnvelope = new CryptoEnvelope(cryptoAES, cryptoRSA); cryptoSignature = new CryptoSignature(cryptoSHA2, cryptoRSA); cbAESKeySize.SelectedIndex = cbSHA2Size.SelectedIndex = 0; cbRSAKeySize.SelectedIndex = 2; ofd.Filter = sfd.Filter = "txt files (*.txt)|*.txt|" + "pdf files (*.pdf)|*.pdf|" + "All files (*.*)|*.*"; }
public CryptoEnvelope(CryptoAES cryptoAES, CryptoRSA cryptoRSA) { this.cryptoAES = cryptoAES; this.cryptoRSA = cryptoRSA; currentSymKeySize = cryptoAES.CurrentKeySize = 128; }