mirror of
https://github.com/eliasstepanik/vdo.ninja.git
synced 2026-01-13 22:58:35 +00:00
Delete changepass.html
This commit is contained in:
parent
15030fe123
commit
cee772d031
@ -1,25 +0,0 @@
|
||||
<html><body><script>
|
||||
var generateHash = function (str, length=false){
|
||||
var buffer = new TextEncoder("utf-8").encode(str);
|
||||
return crypto.subtle.digest("SHA-256", buffer).then(
|
||||
function (hash) {
|
||||
hash = new Uint8Array(hash);
|
||||
if (length){
|
||||
hash = hash.slice(0, parseInt(parseInt(length)/2));
|
||||
}
|
||||
hash = toHexString(hash);
|
||||
return hash;
|
||||
}
|
||||
);
|
||||
};
|
||||
function toHexString(byteArray){
|
||||
return Array.prototype.map.call(byteArray, function(byte){
|
||||
return ('0' + (byte & 0xFF).toString(16)).slice(-2);
|
||||
}).join('');
|
||||
}
|
||||
var password = prompt("Please enter the password");
|
||||
|
||||
generateHash(password + location.hostname, 4).then(function(hash) { // million to one error.
|
||||
alert("hash value: "+hash)
|
||||
});
|
||||
</script></body></html>
|
||||
Loading…
x
Reference in New Issue
Block a user