I have a class file which contains a function to hash an input string.
using System;
using System.Security.Cryptography;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace XHD_Console
{
public class HashingSystem
{
public static string Sha256(string text)
{
string hashString = string.Empty;
//code for hashing here, contains some things i'd rather not release.
return hashString;
}
}
}
I want to call the sha256 function from a form, intellisense detects the class HashingSystem, but not the function. Is there a reason? I've read it needs to be static, done that but to no avail. Both classes are in the same namespace, but the class hashingsystem has it's own file, hashingsystem.cs
To call the function:
private void submit_Click(object sender, EventArgs e){
this.EnteredPassword = HashingSystem.sha256(input_Password.Text);
this.DialogResult = DialogResult.OK;
this.Close();
}