Basically, what I'd like to do is have a JavaScript function that checks whether you've entered a specific string -- but I don't want that string to be actually visible in the source code. In my mind, it would go something like this:
function checkPass(input) {
if (encrypt(input) === 'OJqqyaQUD4APlZvAg3fvCii8Os9qBr23tlzWwjbw') {
alert('Success');
} else {
alert('Fail');
}
}
function encrypt(input) {
//pass it through some encryption algorithm
}
How might I accomplish this –– ideally, without any external libraries?