Hi i'm trying to run a class when a checkbox is checked but i get errors asking for arguments to be added i have tried with the following code but still no luck!
private void Encrypt_Click(object sender, RoutedEventArgs e)
{
if (UseAES.IsChecked == true)
AesEncryptText(input, password);
}
This is the class its calling
public string AesEncryptText(string input, string password)
{
byte[] bytesToBeEncrypted = Encoding.UTF8.GetBytes(input);
byte[] passwordBytes = Encoding.UTF8.GetBytes(password);
passwordBytes = SHA256.Create().ComputeHash(passwordBytes);
byte[] bytesEncrypted = AES_Encrypt(bytesToBeEncrypted, passwordBytes);
string result = Convert.ToBase64String(bytesEncrypted);
DecryptText.Text = result;
return result;
}
Aucun commentaire:
Enregistrer un commentaire