private void radbtn_basicEncrypt_CheckedChanged(object sender, EventArgs e) { /*With the Basic encryption there is no need for a key the number up down text box * therefore this can be disabled, as well as the key text box. The default key text * that explains the requirements of the key can be set to the keys text boxs text.*/ numUpDown_KeySize.Enabled = false; txtB_key.ReadOnly = true; txtB_key.Enabled = false; txtB_key.Text = defaultBasicKeyTxt; encrypt_typ = Encrption_type.BASIC; chbx_UseIV.Enabled = false; }
private void radbtn_AesEncryt_CheckedChanged(object sender, EventArgs e) { /*With the Rijndael encryption a key is required so the key text box should be * enabled as well as the number up down text box for selecting the key lenght. * The key text feild is also set the have a discriptive value for what the size * of the key required will be until the user enters his or her key.*/ numUpDown_KeySize.Enabled = true; txtB_key.ReadOnly = false; txtB_key.Enabled = true; //In order to convert the key size from bits to an int value we must devied the value by 8. txtB_key.Text = (keySizebit / 8) + defaultAESKeyTxt; encrypt_typ = Encrption_type.RIJNDAEL; chbx_UseIV.Enabled = true; }