/// <summary> /// hashes the users input /// </summary> public void InputChanges(object obj = null) { // Creates the Hashing object if it is managed or not if (selectedHashing.Managed) { hashing = new Hashing(); } else { hashing = new HmacHashing(); } // Sets the hashingtype hashing.SetHashingType(selectedHashing.Name); // Converts the message to bytes using ascii byte[] message = Encoding.ASCII.GetBytes(this.message); // Hashes the message Time = hashing.ComputeMAC(ref message, Encoding.ASCII.GetBytes(key)); hashed = message; // Updates the output UpdateOutput(obj); // Validates the generatede mac with the inputed mac Validate(obj); }