PageSourceSearch

https://byob.studio/_app/immutable/chunks/9-3YhLRW.js

js byob.studio collected 2026-09-24 13:56:33 UTC 2,690 bytes, 2 lines download raw bytes

1import"./Bzak7iHL.js";import{p as K,ap as L,h as a,ax as u,g as r,f as c,b as o,d as w,s as H,c as M,aG as Q,n as V,r as S,t as X,e as Y,i as F,a as j,az as z}from"./7ngGZi-H.js";import{i as A}from"./B43B0yqw.js";import{s as Z}from"./DCJNo0Xp.js";import{a as $}from"./BbdvPgt3.js";import{F as ee}from"./OCdojPJo.js";import{S as T}from"./S1VVTpgi.js";var te=c('<textarea class="textarea textarea-bordered w-full font-mono text-sm" rows="4" placeholder="Paste text to fingerprint"></textarea>'),ae=c('<p class="alert alert-error text-sm" role="alert"> </p>'),re=c('<p class="text-sm opacity-70" role="status" aria-live="polite">Computing hashes…</p>'),se=c('<div class="flex min-w-0 flex-col gap-3"><!> <!> <!></div>'),oe=c('<p class="text-sm opacity-70">Enter text above to compute its SHA fingerprints.</p>'),le=c(`<div class="flex min-w-0 flex-col gap-4"><!> <!> <p class="text-xs opacity-60">Hashing is one-way: you can verify a match, but you cannot reverse a hash back to the
2		original text.</p></div>`);function he(G,I){K(I,!0);let m=u(""),n=u(""),f=u(""),v=u(""),h=u(""),x=u(!1);function N(e){return Array.from(new Uint8Array(e)).map(t=>t.toString(16).padStart(2,"0")).join("")}async function _(e,t){const s=new TextEncoder().encode(t),l=await crypto.subtle.digest(e,s);return N(l)}L(()=>{const e=a(m);if(!e){r(n,""),r(f,""),r(v,""),r(h,""),r(x,!1);return}let t=!1;return r(x,!0),(async()=>{try{if(typeof crypto>"u"||!crypto.subtle)throw new Error("WebCrypto unavailable");const[s,l,b]=await Promise.all([_("SHA-256",e),_("SHA-512",e),_("SHA-1",e)]);if(t)return;r(n,s,!0),r(f,l,!0),r(v,b,!0),r(h,"")}catch{if(t)return;r(n,""),r(f,""),r(v,""),r(h,"Hashing is unavailable in this browser. Open this page over HTTPS or localhost to enable it.")}finally{t||r(x,!1)}})(),()=>{t=!0}});const O=z(()=>a(m).length>0),k=z(()=>a(n).length>0);var y=le(),E=w(y);ee(E,{label:"Text to hash",hint:"Hashes update as you type. Nothing leaves your browser.",children:(e,t)=>{var s=te();Q(s),Z(s,"spellcheck",!1),$(s,()=>a(m),l=>r(m,l)),o(e,s)},$$slots:{default:!0}});var R=H(E,2);{var U=e=>{var t=ae(),s=w(t,!0);S(t),X(()=>Y(s,a(h))),o(e,t)},W=e=>{var t=F(),s=j(t);{var l=i=>{var g=re();o(i,g)},b=i=>{var g=F(),q=j(g);{var B=p=>{var d=se(),P=w(d);T(P,{label:"SHA-256",get value(){return a(n)},get copyText(){return a(n)}});var C=H(P,2);T(C,{label:"SHA-512",get value(){return a(f)},get copyText(){return a(f)}});var J=H(C,2);T(J,{label:"SHA-1",get value(){return a(v)},get copyText(){return a(v)}}),S(d),o(p,d)},D=p=>{var d=oe();o(p,d)};A(q,p=>{a(k)?p(B):p(D,!1)},!0)}o(i,g)};A(s,i=>{a(x)&&a(O)&&!a(k)?i(l):i(b,!1)},!0)}o(e,t)};A(R,e=>{a(h)?e(U):e(W,!1)})}V(2),S(y),o(G,y),M()}export{he as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.