Click here to Skip to main content
15,888,461 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to make a webite for a school project and i need to convert text to hash using javascript.

i make the login but without a hash gen i can't use it.
truth is i ant good with websites but i am good with C# thats why the javascript
is formated like C# lol. I just need a function that i can pass the string to.
can you help

thanks

What I have tried:

function Login()
		{
			var Pass = document.getElementById("Password").value;
			var User = document.getElementById("Username").value;
			var Key = "8C6976E5B5410415BDE908BD4DEE15DFB167A9C873FC4BB8A81F6F2AB448A918" // using SHA256 the passwords "admin"
			var Username = "8C6976E5B5410415BDE908BD4DEE15DFB167A9C873FC4BB8A81F6F2AB448A918" // usernames admin as well
			if (Pass == Key & User == Username) 
			{
				window.open("/access.html")
			}
			else
			{
				alert("Thats not the right username or password");
			}
		} 
Posted
Updated 10-Nov-18 17:17pm
v3

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900