.cf-tool.cf-tool{box-sizing:border-box;max-width:1152px;margin:0 auto;padding:28px 32px;border-radius:14px;background:#1C1B19;color:#F6F3EC;font-family:'Public Sans',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;font-size:17px;line-height:1.5;display:flex;flex-direction:column;gap:20px;text-align:left}
.cf-tool.cf-tool *{box-sizing:border-box}
.cf-tool.cf-tool h3{margin:0;padding:0;font-family:'Fraunces',Georgia,serif;font-size:30px;font-weight:600;line-height:1.15;color:#F6F3EC;letter-spacing:0;text-transform:none}
.cf-tool.cf-tool p{margin:0}
.cf-tool output{color:inherit}
.cf-tool.cf-tool label{margin:0;font-weight:400;color:inherit}
.cf-tool .cf-head{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:8px}
.cf-tool .cf-sub,.cf-tool .cf-note{font-size:15px;color:#D9D3C7}
.cf-tool .cf-label{font-size:14px;color:#D9D3C7}
.cf-tool .cf-peach{color:#F2B880}
.cf-tool .cf-col{display:flex;flex-direction:column;gap:6px}
.cf-tool.cf-tool input[type=text]{width:100%;max-width:none;height:auto;min-height:48px;margin:0;padding:0 14px;border-radius:8px;border:1px solid #5A5650;background:#2A2926;color:#F6F3EC;font-family:'IBM Plex Mono',ui-monospace,Menlo,Consolas,monospace;font-size:17px;line-height:1.2;box-shadow:none}
.cf-tool.cf-tool input[type=text]:focus{outline:2px solid #F2B880;outline-offset:1px;border-color:#F2B880}
.cf-hash .cf-pair2{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(380px,100%),1fr));gap:20px}
.cf-hash .cf-gap8{gap:8px;min-width:0}
.cf-hash .cf-digest{display:block;font-family:'IBM Plex Mono',ui-monospace,Menlo,Consolas,monospace;font-size:15px;line-height:1.55;word-break:break-all}
.cf-hash .cf-d1{color:#F2B880}
.cf-hash .cf-d2{color:#7FB3C4}
.cf-hash .cf-num{color:#F6F3EC;font-family:'IBM Plex Mono',ui-monospace,Menlo,Consolas,monospace}
.cf-hash .cf-same{font-size:16px}
.cf-hash .cf-same b{font-family:'IBM Plex Mono',ui-monospace,Menlo,Consolas,monospace}
@media (max-width:600px){.cf-tool.cf-tool{padding:22px 18px}.cf-tool.cf-tool h3{font-size:26px}.cf-hash .cf-digest{font-size:14px}}
(function () {
/* SHA-256 (FIPS 180-4), written with no ampersand or less-than characters so WordPress's text filters leave it alone. */
var K = [0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2];
var POW = [];
for (var s = 0; 33 > s; s++) POW.push(Math.pow(2, s));
function and32(a, b) { return ~(~a | ~b); }
function rotr(x, n) { var u = x >>> 0; return (u >>> n) | ((u % POW[n]) * POW[32 - n]); }
function utf8(str) {
if (typeof TextEncoder === 'function') return Array.prototype.slice.call(new TextEncoder().encode(str));
var bin = unescape(encodeURIComponent(str)), out = [];
for (var i = 0; bin.length > i; i++) out.push(bin.charCodeAt(i));
return out;
}
function sha256hex(str) {
var bytes = utf8(str);
var bitLen = bytes.length * 8;
bytes.push(128);
while (bytes.length % 64 !== 56) bytes.push(0);
[Math.floor(bitLen / 4294967296), bitLen % 4294967296].forEach(function (v) {
bytes.push(Math.floor(v / 16777216) % 256, Math.floor(v / 65536) % 256, Math.floor(v / 256) % 256, v % 256);
});
var H = [0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19];
for (var i = 0; bytes.length > i; i += 64) {
var w = [];
for (var t = 0; 16 > t; t++) {
var o = i + 4 * t;
w[t] = (bytes[o] * 16777216 + bytes[o + 1] * 65536 + bytes[o + 2] * 256 + bytes[o + 3]) | 0;
}
for (t = 16; 64 > t; t++) {
var s0 = rotr(w[t - 15], 7) ^ rotr(w[t - 15], 18) ^ (w[t - 15] >>> 3);
var s1 = rotr(w[t - 2], 17) ^ rotr(w[t - 2], 19) ^ (w[t - 2] >>> 10);
w[t] = (w[t - 16] + s0 + w[t - 7] + s1) | 0;
}
var a = H[0], b = H[1], c = H[2], d = H[3], e = H[4], f = H[5], g = H[6], h = H[7];
for (t = 0; 64 > t; t++) {
var S1 = rotr(e, 6) ^ rotr(e, 11) ^ rotr(e, 25);
var ch = and32(e, f) ^ and32(~e, g);
var t1 = (h + S1 + ch + K[t] + w[t]) | 0;
var S0 = rotr(a, 2) ^ rotr(a, 13) ^ rotr(a, 22);
var mj = and32(a, b) ^ and32(a, c) ^ and32(b, c);
var t2 = (S0 + mj) | 0;
h = g; g = f; f = e; e = (d + t1) | 0; d = c; c = b; b = a; a = (t1 + t2) | 0;
}
H[0] = (H[0] + a) | 0; H[1] = (H[1] + b) | 0; H[2] = (H[2] + c) | 0; H[3] = (H[3] + d) | 0;
H[4] = (H[4] + e) | 0; H[5] = (H[5] + f) | 0; H[6] = (H[6] + g) | 0; H[7] = (H[7] + h) | 0;
}
return H.map(function (x) { return ('00000000' + (x >>> 0).toString(16)).slice(-8); }).join('');
}
function zeros(hex) { var n = 0; while (hex.length > n) { if (hex.charAt(n) !== '0') break; n++; } return n; }
var roots = document.querySelectorAll('.cf-hash:not([data-cf-ready])');
Array.prototype.forEach.call(roots, function (root) {
root.setAttribute('data-cf-ready', '1');
var q = function (k) { return root.querySelector('[data-cf="' + k + '"]'); };
q('a').addEventListener('input', render);
q('b').addEventListener('input', render);
function render() {
var ha = sha256hex(String(q('a').value)), hb = sha256hex(String(q('b').value));
var same = 0;
for (var i = 0; 64 > i; i++) { if (ha.charAt(i) === hb.charAt(i)) same++; }
q('ha').textContent = ha;
q('hb').textContent = hb;
q('za').textContent = String(zeros(ha));
q('zb').textContent = String(zeros(hb));
q('same').textContent = String(same);
}
render();
});
})();