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;
u
You need to call static
members against the class
, not against an instance of a class
. So you need to use:
HashingSystem.sha256("texthere");
Also, consider changing:
class HashingSystem
to:
public class HashingSystem
Classes are internal by default. I would recommend you always be explicit about visibility (i.e. always specify internal
, public
or private
).