SHA256
add stupid email obfuscation
This commit is contained in:
+26
-1
@@ -144,7 +144,7 @@
|
||||
</p>
|
||||
|
||||
<div class="links">
|
||||
<a href="mailto:contact@whoswhip.dev">email</a>
|
||||
<a id="email">email</a>
|
||||
<span class="link-separator">/</span>
|
||||
<a rel="pgpkey" href="/public.asc">public key</a>
|
||||
<span class="link-separator">/</span>
|
||||
@@ -159,6 +159,10 @@
|
||||
<script>
|
||||
const timeElement = document.getElementById("local-time")
|
||||
|
||||
const key = new Uint8Array([53, 55, 98, 52, 52, 57, 50, 97, 99, 50, 51, 99, 101, 54, 57, 97, 54, 50, 99, 99, 51, 48, 55, 51, 48, 101, 99, 97, 55, 50, 50, 50, 48, 97, 52, 102, 55, 100, 52, 100, 57, 97, 102, 99, 49, 51, 48, 54, 50, 50, 101, 48, 48, 55, 99, 49, 48, 98, 99, 54, 50, 97, 101, 51,])
|
||||
document.getElementById("email").href = xorDecrypt("WFYLWEBWCAIMXEcCBkJ5Fl5dEBRbWUcdVAAV", key)
|
||||
|
||||
|
||||
function getTime() {
|
||||
return new Date().toLocaleTimeString('en-GB', {
|
||||
timeZone: 'America/Toronto',
|
||||
@@ -174,6 +178,27 @@
|
||||
updateTime();
|
||||
timeElement.style.display = "block";
|
||||
setInterval(updateTime, 1000);
|
||||
|
||||
// https://xjavascript.com/blog/simple-javascript-encryption-decryption-without-using-key/
|
||||
function xorDecrypt(encryptedBase64, secret) {
|
||||
// Convert Base64 encrypted data back to bytes
|
||||
const encryptedBytes = new Uint8Array(
|
||||
atob(encryptedBase64).split("").map(char => char.charCodeAt(0))
|
||||
);
|
||||
|
||||
// Convert secret to UTF-8 bytes
|
||||
const encoder = new TextEncoder();
|
||||
|
||||
// XOR encrypted bytes with secret to get plaintext bytes
|
||||
const decryptedBytes = encryptedBytes.map((byte, index) => {
|
||||
const secretByte = secret[index % secret.length];
|
||||
return byte ^ secretByte; // XOR again to decrypt
|
||||
});
|
||||
|
||||
// Convert decrypted bytes back to string
|
||||
const decoder = new TextDecoder();
|
||||
return decoder.decode(decryptedBytes);
|
||||
}
|
||||
</script>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user