public void TestPasswordHasing() { //make a password string test = "HereBeDragons64"; string hash; string salt; _passwordBuilder.CreateHash(test, out hash, out salt); //get back var returnTest = _passwordBuilder.ComputeHash_ShaSalt(test, StringHandler.GetBytes(salt)); var testString = Convert.ToBase64String(returnTest); Assert.AreEqual(testString, hash); //check if check works var check = _passwordBuilder.CheckPassword(test, hash, salt); Assert.IsTrue(check); }