This is not really a “solution” as these sort of things should be stored server side. But you can use a tool like obfuscator.io (make sure to encrypt strings) and obfuscate it to the point where it would be very difficult (not impossible) to hack
@AMDryzen5600X you can find the sha-256 hash of whatever the password is and then save that as var password in your code. Then on guess, hash whatever the input is in prompt(‘Enter Password’,‘’) and see if it is equal to var password. You’d never save the actual password in your code.
@CoderGautamYT but still hash prior to sending to server!
Don’t you want to hash on the server so you can add salt?
^^ Totally, obfuscator.io really does nothing. It is more an annoyance. Totally not secure and definitely should not be used.
@InvisibleOne you can rehash and salt server side using some unique identifier of the user, but by hashing client side, even in the case of a hack, the user’s actual password is never sent over